From f621f3036464919fbfa87967da61e40ff40b757c Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 13:22:52 +0100 Subject: [PATCH 01/33] fix: remove gas airdrop logic --- contracts/bridge/SynapseBridge.sol | 7 ------- 1 file changed, 7 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index e5a896b4b..997b132ac 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -244,9 +244,6 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua emit TokenMint(to, token, amount.sub(fee), fee, kappa); token.mint(address(this), amount); IERC20(token).safeTransfer(to, amount.sub(fee)); - if (chainGasAmount != 0 && address(this).balance > chainGasAmount) { - to.call.value(chainGasAmount)(""); - } } /** @@ -353,10 +350,6 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua require(!kappaMap[kappa], "Kappa is already present"); kappaMap[kappa] = true; fees[address(token)] = fees[address(token)].add(fee); - // Transfer gas airdrop - if (chainGasAmount != 0 && address(this).balance > chainGasAmount) { - to.call.value(chainGasAmount)(""); - } // first check to make sure more will be given than min amount required uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee)); From 3b7545d1f5f512ce656a829e691f27c40331b2dc Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 13:26:51 +0100 Subject: [PATCH 02/33] feat: allow governance to withdraw unspent gas airdops --- contracts/bridge/SynapseBridge.sol | 36 +++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 997b132ac..8e06d2ff0 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -48,6 +48,12 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua chainGasAmount = amount; } + function withdrawChainGas() external { + require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); + (bool success, ) = msg.sender.call{value: address(this).balance}(""); + require(success, "ETH_TRANSFER_FAILED"); + } + function setWethAddress(address payable _wethAddress) external { require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Not admin"); WETH_ADDRESS = _wethAddress; @@ -161,7 +167,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - **/ + * + */ function deposit( address to, uint256 chainId, @@ -178,7 +185,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which underlying chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - **/ + * + */ function redeem( address to, uint256 chainId, @@ -196,7 +204,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param amount Amount in native token decimals to withdraw * @param fee Amount in native token decimals to save to the contract as fees * @param kappa kappa - **/ + * + */ function withdraw( address to, IERC20 token, @@ -228,7 +237,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param amount Amount in native token decimals to transfer cross-chain post-fees * @param fee Amount in native token decimals to save to the contract as fees * @param kappa kappa - **/ + * + */ function mint( address payable to, IERC20Mintable token, @@ -256,7 +266,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param tokenIndexTo the token the user wants to swap to * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param deadline latest timestamp to accept this transaction - **/ + * + */ function depositAndSwap( address to, uint256 chainId, @@ -281,7 +292,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param tokenIndexTo the token the user wants to swap to * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param deadline latest timestamp to accept this transaction - **/ + * + */ function redeemAndSwap( address to, uint256 chainId, @@ -305,7 +317,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token - **/ + * + */ function redeemAndRemove( address to, uint256 chainId, @@ -332,7 +345,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20. * @param deadline Epoch time of the deadline that the swap is allowed to be executed. * @param kappa kappa - **/ + * + */ function mintAndSwap( address payable to, IERC20Mintable token, @@ -437,7 +451,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token * @param kappa kappa - **/ + * + */ function withdrawAndRemove( address to, IERC20 token, @@ -513,7 +528,8 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which underlying chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - **/ + * + */ function redeemV2( bytes32 to, uint256 chainId, From 2cde3ea81824caa06fdd51d6a4a698292c276f29 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:00:18 +0100 Subject: [PATCH 03/33] feat: add legacy flag --- contracts/bridge/SynapseBridge.sol | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 8e06d2ff0..964958264 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -34,6 +34,12 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua address payable public WETH_ADDRESS; mapping(bytes32 => bool) private kappaMap; + bool public isLegacyBridgeDisabled; + + modifier legacyBridgeEnabled() { + require(!isLegacyBridgeDisabled, "Legacy bridge is disabled"); + _; + } receive() external payable {} @@ -54,6 +60,11 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua require(success, "ETH_TRANSFER_FAILED"); } + function setLegacyBridgeDisabled(bool _isLegacyBridgeDisabled) external { + require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); + isLegacyBridgeDisabled = _isLegacyBridgeDisabled; + } + function setWethAddress(address payable _wethAddress) external { require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Not admin"); WETH_ADDRESS = _wethAddress; @@ -174,7 +185,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, IERC20 token, uint256 amount - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenDeposit(to, chainId, token, amount); token.safeTransferFrom(msg.sender, address(this), amount); } @@ -192,7 +203,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, ERC20Burnable token, uint256 amount - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenRedeem(to, chainId, token, amount); token.burnFrom(msg.sender, amount); } @@ -277,7 +288,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 tokenIndexTo, uint256 minDy, uint256 deadline - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline); token.safeTransferFrom(msg.sender, address(this), amount); } @@ -303,7 +314,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 tokenIndexTo, uint256 minDy, uint256 deadline - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline); token.burnFrom(msg.sender, amount); } @@ -327,7 +338,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 swapTokenIndex, uint256 swapMinAmount, uint256 swapDeadline - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline); token.burnFrom(msg.sender, amount); } @@ -535,7 +546,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, ERC20Burnable token, uint256 amount - ) external nonReentrant whenNotPaused { + ) external nonReentrant whenNotPaused legacyBridgeEnabled { emit TokenRedeemV2(to, chainId, token, amount); token.burnFrom(msg.sender, amount); } From 20b104d1b5576ccd6f1879be5e2486dcdc075b0a Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:00:45 +0100 Subject: [PATCH 04/33] test: coverage for legacy flagf --- test/bridge/legacy/SynapseBridge.t.sol | 226 +++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 test/bridge/legacy/SynapseBridge.t.sol diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol new file mode 100644 index 000000000..cb87057e1 --- /dev/null +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -0,0 +1,226 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseBridge, IERC20, ERC20Burnable} from "../../../contracts/bridge/SynapseBridge.sol"; +import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; + +import {Test} from "forge-std/Test.sol"; + +// solhint-disable func-name-mixedcase +contract SynapseBridgeLegacyTest is Test { + SynapseBridge internal bridge; + SynapseERC20 internal token; + + address internal user = makeAddr("User"); + + event TokenDeposit(address indexed to, uint256 chainId, address token, uint256 amount); + event TokenRedeem(address indexed to, uint256 chainId, address token, uint256 amount); + event TokenDepositAndSwap( + address indexed to, + uint256 chainId, + address token, + uint256 amount, + uint8 tokenIndexFrom, + uint8 tokenIndexTo, + uint256 minDy, + uint256 deadline + ); + event TokenRedeemAndSwap( + address indexed to, + uint256 chainId, + address token, + uint256 amount, + uint8 tokenIndexFrom, + uint8 tokenIndexTo, + uint256 minDy, + uint256 deadline + ); + event TokenRedeemAndRemove( + address indexed to, + uint256 chainId, + address token, + uint256 amount, + uint8 swapTokenIndex, + uint256 swapMinAmount, + uint256 swapDeadline + ); + + event TokenRedeemV2(bytes32 indexed to, uint256 chainId, address token, uint256 amount); + + function setUp() public { + bridge = new SynapseBridge(); + bridge.initialize(); + bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(this)); + + token = new SynapseERC20(); + token.initialize("Test", "TST", 18, address(this)); + token.grantRole(token.MINTER_ROLE(), address(this)); + + token.mint(user, 1 ether); + vm.prank(user); + token.approve(address(bridge), type(uint256).max); + } + + function test_deposit() public { + vm.expectEmit(address(bridge)); + emit TokenDeposit({to: address(1), chainId: 2, token: address(token), amount: 3}); + vm.prank(user); + bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); + } + + function test_deposit_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); + } + + function test_depositAndSwap() public { + vm.expectEmit(address(bridge)); + emit TokenDepositAndSwap({ + to: address(1), + chainId: 2, + token: address(token), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + vm.prank(user); + bridge.depositAndSwap({ + to: address(1), + chainId: 2, + token: IERC20(address(token)), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + } + + function test_depositAndSwap_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.depositAndSwap({ + to: address(1), + chainId: 2, + token: IERC20(address(token)), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + } + + function test_redeem() public { + vm.expectEmit(address(bridge)); + emit TokenRedeem({to: address(1), chainId: 2, token: address(token), amount: 3}); + vm.prank(user); + bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); + } + + function test_redeem_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); + } + + function test_redeemAndSwap() public { + vm.expectEmit(address(bridge)); + emit TokenRedeemAndSwap({ + to: address(1), + chainId: 2, + token: address(token), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + vm.prank(user); + bridge.redeemAndSwap({ + to: address(1), + chainId: 2, + token: ERC20Burnable(address(token)), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + } + + function test_redeemAndSwap_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.redeemAndSwap({ + to: address(1), + chainId: 2, + token: ERC20Burnable(address(token)), + amount: 3, + tokenIndexFrom: 4, + tokenIndexTo: 5, + minDy: 6, + deadline: 7 + }); + } + + function test_redeemAndRemove() public { + vm.expectEmit(address(bridge)); + emit TokenRedeemAndRemove({ + to: address(1), + chainId: 2, + token: address(token), + amount: 3, + swapTokenIndex: 4, + swapMinAmount: 5, + swapDeadline: 6 + }); + vm.prank(user); + bridge.redeemAndRemove({ + to: address(1), + chainId: 2, + token: ERC20Burnable(address(token)), + amount: 3, + swapTokenIndex: 4, + swapMinAmount: 5, + swapDeadline: 6 + }); + } + + function test_redeemAndRemove_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.redeemAndRemove({ + to: address(1), + chainId: 2, + token: ERC20Burnable(address(token)), + amount: 3, + swapTokenIndex: 4, + swapMinAmount: 5, + swapDeadline: 6 + }); + } + + function test_redeemV2() public { + vm.expectEmit(address(bridge)); + emit TokenRedeemV2({to: bytes32(uint256(1)), chainId: 2, token: address(token), amount: 3}); + vm.prank(user); + bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); + } + + function test_redeemV2_revert_disabled() public { + bridge.setLegacyBridgeDisabled(true); + vm.expectRevert("Legacy bridge is disabled"); + vm.prank(user); + bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); + } +} From 285d915cbe38dcb775b583b1124a9d8825cbdac2 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:06:23 +0100 Subject: [PATCH 05/33] test: coverage for new gov actions --- test/bridge/legacy/SynapseBridge.t.sol | 54 ++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index cb87057e1..7da585f82 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -13,6 +13,7 @@ contract SynapseBridgeLegacyTest is Test { SynapseERC20 internal token; address internal user = makeAddr("User"); + address internal governance = makeAddr("Governance"); event TokenDeposit(address indexed to, uint256 chainId, address token, uint256 amount); event TokenRedeem(address indexed to, uint256 chainId, address token, uint256 amount); @@ -51,7 +52,7 @@ contract SynapseBridgeLegacyTest is Test { function setUp() public { bridge = new SynapseBridge(); bridge.initialize(); - bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(this)); + bridge.grantRole(bridge.GOVERNANCE_ROLE(), governance); token = new SynapseERC20(); token.initialize("Test", "TST", 18, address(this)); @@ -62,6 +63,45 @@ contract SynapseBridgeLegacyTest is Test { token.approve(address(bridge), type(uint256).max); } + function disableLegacyBridge() public { + vm.prank(governance); + bridge.setLegacyBridgeDisabled(true); + } + + function test_disableLegacyBridge() public { + disableLegacyBridge(); + assertTrue(bridge.isLegacyBridgeDisabled()); + } + + function test_enableLegacyBridge() public { + disableLegacyBridge(); + vm.prank(governance); + bridge.setLegacyBridgeDisabled(false); + assertFalse(bridge.isLegacyBridgeDisabled()); + } + + function test_setLegacyBridgeDisabled_revert_notGovernance(address caller) public { + vm.assume(caller != governance); + vm.prank(caller); + vm.expectRevert("Not governance"); + bridge.setLegacyBridgeDisabled(true); + } + + function test_withdrawChainGas() public { + deal(address(bridge), 123456); + vm.prank(governance); + bridge.withdrawChainGas(); + assertEq(governance.balance, 123456); + } + + function test_withdrawChainGas_revert_notGovernance(address caller) public { + deal(address(bridge), 123456); + vm.assume(caller != governance); + vm.prank(caller); + vm.expectRevert("Not governance"); + bridge.withdrawChainGas(); + } + function test_deposit() public { vm.expectEmit(address(bridge)); emit TokenDeposit({to: address(1), chainId: 2, token: address(token), amount: 3}); @@ -70,7 +110,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_deposit_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); @@ -102,7 +142,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_depositAndSwap_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.depositAndSwap({ @@ -125,7 +165,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeem_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); @@ -157,7 +197,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemAndSwap_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemAndSwap({ @@ -196,7 +236,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemAndRemove_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemAndRemove({ @@ -218,7 +258,7 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemV2_revert_disabled() public { - bridge.setLegacyBridgeDisabled(true); + disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); From f7785719629399c21aed2e3c08367c37c254b486 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:08:27 +0100 Subject: [PATCH 06/33] test: reenabling --- test/bridge/legacy/SynapseBridge.t.sol | 44 ++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index 7da585f82..e8b0c99c6 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -68,6 +68,11 @@ contract SynapseBridgeLegacyTest is Test { bridge.setLegacyBridgeDisabled(true); } + function enableLegacyBridge() public { + vm.prank(governance); + bridge.setLegacyBridgeDisabled(false); + } + function test_disableLegacyBridge() public { disableLegacyBridge(); assertTrue(bridge.isLegacyBridgeDisabled()); @@ -75,8 +80,7 @@ contract SynapseBridgeLegacyTest is Test { function test_enableLegacyBridge() public { disableLegacyBridge(); - vm.prank(governance); - bridge.setLegacyBridgeDisabled(false); + enableLegacyBridge(); assertFalse(bridge.isLegacyBridgeDisabled()); } @@ -109,6 +113,12 @@ contract SynapseBridgeLegacyTest is Test { bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); } + function test_deposit_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_deposit(); + } + function test_deposit_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); @@ -141,6 +151,12 @@ contract SynapseBridgeLegacyTest is Test { }); } + function test_depositAndSwap_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_depositAndSwap(); + } + function test_depositAndSwap_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); @@ -164,6 +180,12 @@ contract SynapseBridgeLegacyTest is Test { bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); } + function test_redeem_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_redeem(); + } + function test_redeem_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); @@ -196,6 +218,12 @@ contract SynapseBridgeLegacyTest is Test { }); } + function test_redeemAndSwap_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_redeemAndSwap(); + } + function test_redeemAndSwap_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); @@ -235,6 +263,12 @@ contract SynapseBridgeLegacyTest is Test { }); } + function test_redeemAndRemove_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_redeemAndRemove(); + } + function test_redeemAndRemove_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); @@ -257,6 +291,12 @@ contract SynapseBridgeLegacyTest is Test { bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); } + function test_redeemV2_reenabled() public { + disableLegacyBridge(); + enableLegacyBridge(); + test_redeemV2(); + } + function test_redeemV2_revert_disabled() public { disableLegacyBridge(); vm.expectRevert("Legacy bridge is disabled"); From e9bb7016f2e643f1b1c458dc6fcd1ea4ab68ce84 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 22 Apr 2025 11:52:53 +0100 Subject: [PATCH 07/33] chore: revert docs formatting changes --- contracts/bridge/SynapseBridge.sol | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 964958264..21883cce8 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -178,8 +178,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - * - */ + **/ function deposit( address to, uint256 chainId, @@ -196,8 +195,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which underlying chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - * - */ + **/ function redeem( address to, uint256 chainId, @@ -215,8 +213,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param amount Amount in native token decimals to withdraw * @param fee Amount in native token decimals to save to the contract as fees * @param kappa kappa - * - */ + **/ function withdraw( address to, IERC20 token, @@ -248,8 +245,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param amount Amount in native token decimals to transfer cross-chain post-fees * @param fee Amount in native token decimals to save to the contract as fees * @param kappa kappa - * - */ + **/ function mint( address payable to, IERC20Mintable token, @@ -277,8 +273,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param tokenIndexTo the token the user wants to swap to * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param deadline latest timestamp to accept this transaction - * - */ + **/ function depositAndSwap( address to, uint256 chainId, @@ -303,8 +298,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param tokenIndexTo the token the user wants to swap to * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain. * @param deadline latest timestamp to accept this transaction - * - */ + **/ function redeemAndSwap( address to, uint256 chainId, @@ -328,8 +322,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token - * - */ + **/ function redeemAndRemove( address to, uint256 chainId, @@ -356,8 +349,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20. * @param deadline Epoch time of the deadline that the swap is allowed to be executed. * @param kappa kappa - * - */ + **/ function mintAndSwap( address payable to, IERC20Mintable token, @@ -462,8 +454,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token * @param kappa kappa - * - */ + **/ function withdrawAndRemove( address to, IERC20 token, @@ -539,8 +530,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua * @param chainId which underlying chain to bridge assets onto * @param token ERC20 compatible token to deposit into the bridge * @param amount Amount in native token decimals to transfer cross-chain pre-fees - * - */ + **/ function redeemV2( bytes32 to, uint256 chainId, From 189b72e6dc357036adbc5940e8e3dc1cec952589 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:08:48 +0100 Subject: [PATCH 08/33] chore: bump bridge version --- contracts/bridge/SynapseBridge.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 21883cce8..896b7df5f 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -29,7 +29,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua mapping(address => uint256) private fees; uint256 public startBlockNumber; - uint256 public constant bridgeVersion = 6; + uint256 public constant bridgeVersion = 8; uint256 public chainGasAmount; address payable public WETH_ADDRESS; From acbcaa84b8d9303bc693ba0e497c6f3621514b03 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:18:10 +0100 Subject: [PATCH 09/33] refactor: more explicit name for sending tokens --- contracts/bridge/SynapseBridge.sol | 22 ++++----- test/bridge/legacy/SynapseBridge.t.sol | 62 +++++++++++++------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 896b7df5f..ae530f267 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -34,10 +34,10 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua address payable public WETH_ADDRESS; mapping(bytes32 => bool) private kappaMap; - bool public isLegacyBridgeDisabled; + bool public isLegacySendDisabled; - modifier legacyBridgeEnabled() { - require(!isLegacyBridgeDisabled, "Legacy bridge is disabled"); + modifier legacySendEnabled() { + require(!isLegacySendDisabled, "Legacy send is disabled"); _; } @@ -60,9 +60,9 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua require(success, "ETH_TRANSFER_FAILED"); } - function setLegacyBridgeDisabled(bool _isLegacyBridgeDisabled) external { + function setLegacySendDisabled(bool _isLegacySendDisabled) external { require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); - isLegacyBridgeDisabled = _isLegacyBridgeDisabled; + isLegacySendDisabled = _isLegacySendDisabled; } function setWethAddress(address payable _wethAddress) external { @@ -184,7 +184,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, IERC20 token, uint256 amount - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenDeposit(to, chainId, token, amount); token.safeTransferFrom(msg.sender, address(this), amount); } @@ -201,7 +201,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, ERC20Burnable token, uint256 amount - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenRedeem(to, chainId, token, amount); token.burnFrom(msg.sender, amount); } @@ -283,7 +283,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 tokenIndexTo, uint256 minDy, uint256 deadline - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline); token.safeTransferFrom(msg.sender, address(this), amount); } @@ -308,7 +308,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 tokenIndexTo, uint256 minDy, uint256 deadline - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline); token.burnFrom(msg.sender, amount); } @@ -331,7 +331,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint8 swapTokenIndex, uint256 swapMinAmount, uint256 swapDeadline - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline); token.burnFrom(msg.sender, amount); } @@ -536,7 +536,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 chainId, ERC20Burnable token, uint256 amount - ) external nonReentrant whenNotPaused legacyBridgeEnabled { + ) external nonReentrant whenNotPaused legacySendEnabled { emit TokenRedeemV2(to, chainId, token, amount); token.burnFrom(msg.sender, amount); } diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index e8b0c99c6..6ea7c8d4b 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -63,32 +63,32 @@ contract SynapseBridgeLegacyTest is Test { token.approve(address(bridge), type(uint256).max); } - function disableLegacyBridge() public { + function disableLegacySend() public { vm.prank(governance); - bridge.setLegacyBridgeDisabled(true); + bridge.setLegacySendDisabled(true); } - function enableLegacyBridge() public { + function enableLegacySend() public { vm.prank(governance); - bridge.setLegacyBridgeDisabled(false); + bridge.setLegacySendDisabled(false); } - function test_disableLegacyBridge() public { - disableLegacyBridge(); - assertTrue(bridge.isLegacyBridgeDisabled()); + function test_disableLegacySend() public { + disableLegacySend(); + assertTrue(bridge.isLegacySendDisabled()); } - function test_enableLegacyBridge() public { - disableLegacyBridge(); - enableLegacyBridge(); - assertFalse(bridge.isLegacyBridgeDisabled()); + function test_enableLegacySend() public { + disableLegacySend(); + enableLegacySend(); + assertFalse(bridge.isLegacySendDisabled()); } - function test_setLegacyBridgeDisabled_revert_notGovernance(address caller) public { + function test_setLegacySendDisabled_revert_notGovernance(address caller) public { vm.assume(caller != governance); vm.prank(caller); vm.expectRevert("Not governance"); - bridge.setLegacyBridgeDisabled(true); + bridge.setLegacySendDisabled(true); } function test_withdrawChainGas() public { @@ -114,13 +114,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_deposit_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_deposit(); } function test_deposit_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); @@ -152,13 +152,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_depositAndSwap_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_depositAndSwap(); } function test_depositAndSwap_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.depositAndSwap({ @@ -181,13 +181,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeem_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_redeem(); } function test_redeem_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); @@ -219,13 +219,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemAndSwap_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_redeemAndSwap(); } function test_redeemAndSwap_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemAndSwap({ @@ -264,13 +264,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemAndRemove_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_redeemAndRemove(); } function test_redeemAndRemove_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemAndRemove({ @@ -292,13 +292,13 @@ contract SynapseBridgeLegacyTest is Test { } function test_redeemV2_reenabled() public { - disableLegacyBridge(); - enableLegacyBridge(); + disableLegacySend(); + enableLegacySend(); test_redeemV2(); } function test_redeemV2_revert_disabled() public { - disableLegacyBridge(); + disableLegacySend(); vm.expectRevert("Legacy bridge is disabled"); vm.prank(user); bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); From 0f34b971cdb86ec238fb3dbcf24c7f8408e7b67a Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:30:03 +0100 Subject: [PATCH 10/33] chore: update actions/cache@v2 to v4 in GitHub workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/coveralls.yaml | 2 +- .github/workflows/test.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coveralls.yaml b/.github/workflows/coveralls.yaml index 8d8d6d634..59a00410c 100644 --- a/.github/workflows/coveralls.yaml +++ b/.github/workflows/coveralls.yaml @@ -31,7 +31,7 @@ jobs: node-version: "${{ steps.nvm.outputs.NVMRC }}" - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a482cb666..31bb242fb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -51,7 +51,7 @@ jobs: submodules: recursive - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -82,7 +82,7 @@ jobs: submodules: recursive - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: From 34072987ee23244dafece22c1ba5c7b16bdd2e3e Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:55:01 +0100 Subject: [PATCH 11/33] fix: update tests --- test/bridge/legacy/SynapseBridge.t.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index 6ea7c8d4b..212d9dd7f 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -121,7 +121,7 @@ contract SynapseBridgeLegacyTest is Test { function test_deposit_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.deposit({to: address(1), chainId: 2, token: IERC20(address(token)), amount: 3}); } @@ -159,7 +159,7 @@ contract SynapseBridgeLegacyTest is Test { function test_depositAndSwap_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.depositAndSwap({ to: address(1), @@ -188,7 +188,7 @@ contract SynapseBridgeLegacyTest is Test { function test_redeem_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.redeem({to: address(1), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); } @@ -226,7 +226,7 @@ contract SynapseBridgeLegacyTest is Test { function test_redeemAndSwap_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.redeemAndSwap({ to: address(1), @@ -271,7 +271,7 @@ contract SynapseBridgeLegacyTest is Test { function test_redeemAndRemove_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.redeemAndRemove({ to: address(1), @@ -299,7 +299,7 @@ contract SynapseBridgeLegacyTest is Test { function test_redeemV2_revert_disabled() public { disableLegacySend(); - vm.expectRevert("Legacy bridge is disabled"); + vm.expectRevert("Legacy send is disabled"); vm.prank(user); bridge.redeemV2({to: bytes32(uint256(1)), chainId: 2, token: ERC20Burnable(address(token)), amount: 3}); } From 84491d92dd2a1a4ae4af4f79e628b153a91f5ab1 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 17:51:49 +0100 Subject: [PATCH 12/33] test: expected behaviour for mint/withdraw pre/post legacy workflows --- test/bridge/legacy/PoolMock.sol | 16 ++ test/bridge/legacy/SynapseBridge.Dst.t.sol | 214 +++++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 test/bridge/legacy/PoolMock.sol create mode 100644 test/bridge/legacy/SynapseBridge.Dst.t.sol diff --git a/test/bridge/legacy/PoolMock.sol b/test/bridge/legacy/PoolMock.sol new file mode 100644 index 000000000..9d6928f4f --- /dev/null +++ b/test/bridge/legacy/PoolMock.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; + +// solhint-disable no-empty-blocks, no-unused-vars +contract PoolMock { + /// @notice We include an empty "test" function so that this contract does not appear in the coverage report. + function testPoolMock() external {} + + function calculateSwap( + uint8 tokenIndexFrom, + uint8 tokenIndexTo, + uint256 amount + ) external returns (uint256) {} + + function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex) external returns (uint256) {} +} diff --git a/test/bridge/legacy/SynapseBridge.Dst.t.sol b/test/bridge/legacy/SynapseBridge.Dst.t.sol new file mode 100644 index 000000000..498999b0e --- /dev/null +++ b/test/bridge/legacy/SynapseBridge.Dst.t.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseBridge, IERC20, ERC20Burnable, IERC20Mintable, ISwap} from "../../../contracts/bridge/SynapseBridge.sol"; +import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; + +import {PoolMock} from "./PoolMock.sol"; + +import {Test} from "forge-std/Test.sol"; + +// solhint-disable func-name-mixedcase +contract SynapseBridgeLegacyDstTest is Test { + SynapseBridge internal bridge; + SynapseERC20 internal token; + address internal pool; + + address internal nodeGroup = makeAddr("NodeGroup"); + address internal user = makeAddr("User"); + bytes32 internal kappa = keccak256("kappa"); + + uint256 internal initialLockedBalance = 1000 ether; + uint256 internal amount = 1 ether; + uint256 internal fee = 0.01 ether; + + event TokenWithdraw(address indexed to, address token, uint256 amount, uint256 fee, bytes32 indexed kappa); + event TokenMint(address indexed to, address token, uint256 amount, uint256 fee, bytes32 indexed kappa); + event TokenMintAndSwap( + address indexed to, + address token, + uint256 amount, + uint256 fee, + uint8 tokenIndexFrom, + uint8 tokenIndexTo, + uint256 minDy, + uint256 deadline, + bool swapSuccess, + bytes32 indexed kappa + ); + event TokenWithdrawAndRemove( + address indexed to, + address token, + uint256 amount, + uint256 fee, + uint8 swapTokenIndex, + uint256 swapMinAmount, + uint256 swapDeadline, + bool swapSuccess, + bytes32 indexed kappa + ); + + modifier withMintToken() { + token.grantRole(token.MINTER_ROLE(), address(bridge)); + _; + } + + modifier withWithdrawToken() { + deal(address(token), address(bridge), initialLockedBalance, true); + _; + } + + modifier withRevertingPool() { + vm.mockCallRevert({callee: address(pool), data: "", revertData: "GM"}); + _; + } + + modifier withLegacySendDisabled() { + bridge.setLegacySendDisabled(true); + _; + } + + function expectMintEvent() public { + vm.expectEmit(address(bridge)); + emit TokenMint(user, address(token), amount - fee, fee, kappa); + } + + function expectMintAndSwapEvent() public { + vm.expectEmit(address(bridge)); + emit TokenMintAndSwap(user, address(token), amount - fee, fee, 0, 0, 1, 0, false, kappa); + } + + function expectWithdrawEvent() public { + // Note: TokenWithdraw emits amount before fees, which is left as is to preserve legacy behavior + vm.expectEmit(address(bridge)); + emit TokenWithdraw(user, address(token), amount, fee, kappa); + } + + function expectWithdrawAndRemoveEvent() public { + vm.expectEmit(address(bridge)); + emit TokenWithdrawAndRemove(user, address(token), amount - fee, fee, 0, 1, 0, false, kappa); + } + + function expectBalances( + uint256 bridgeBalance, + uint256 userBalance, + uint256 bridgeFees + ) public { + assertEq(token.balanceOf(address(bridge)), bridgeBalance); + assertEq(token.balanceOf(user), userBalance); + assertEq(bridge.getFeeBalance(address(token)), bridgeFees); + } + + function setUp() public { + bridge = new SynapseBridge(); + bridge.initialize(); + bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(this)); + bridge.grantRole(bridge.NODEGROUP_ROLE(), nodeGroup); + + token = new SynapseERC20(); + token.initialize("Test", "TST", 18, address(this)); + + pool = address(new PoolMock()); + } + + function test_mint() public withMintToken { + expectMintEvent(); + vm.prank(nodeGroup); + bridge.mint(payable(user), IERC20Mintable(address(token)), amount, fee, kappa); + expectBalances({bridgeBalance: fee, userBalance: amount - fee, bridgeFees: fee}); + assertTrue(bridge.kappaExists(kappa)); + } + + function test_mintAndSwap() public withMintToken { + expectMintAndSwapEvent(); + vm.prank(nodeGroup); + // Use minDy > 0 so that it exceeds calculateSwap = 0 (swapSuccess = false). + bridge.mintAndSwap(payable(user), IERC20Mintable(address(token)), amount, fee, ISwap(pool), 0, 0, 1, 0, kappa); + expectBalances({bridgeBalance: fee, userBalance: amount - fee, bridgeFees: fee}); + assertTrue(bridge.kappaExists(kappa)); + } + + function test_mintAndSwap_reverts_withRevertingPool() public withMintToken withRevertingPool { + vm.expectRevert(bytes("GM")); + vm.prank(nodeGroup); + bridge.mintAndSwap(payable(user), IERC20Mintable(address(token)), amount, fee, ISwap(pool), 0, 0, 1, 0, kappa); + } + + /// @notice Should behave the same way as the legacy workflow. + function test_mint_legacySendDisabled() public withLegacySendDisabled { + test_mint(); + } + + /// @notice Should ignore andSwap instructions in legacySendDisabled mode. + function test_mintAndSwap_legacySendDisabled_mintFallback() public withLegacySendDisabled withMintToken { + expectMintEvent(); + vm.prank(nodeGroup); + bridge.mintAndSwap(payable(user), IERC20Mintable(address(token)), amount, fee, ISwap(pool), 0, 0, 1, 0, kappa); + expectBalances({bridgeBalance: fee, userBalance: amount - fee, bridgeFees: fee}); + assertTrue(bridge.kappaExists(kappa)); + } + + /// @notice Pool is never called in legacySendDisabled mode, so should be identical to mint fallback. + function test_mintAndSwap_legacySendDisabled_mintFallback_withRevertingPool() public withRevertingPool { + test_mintAndSwap_legacySendDisabled_mintFallback(); + } + + function test_withdraw() public withWithdrawToken { + expectWithdrawEvent(); + vm.prank(nodeGroup); + bridge.withdraw(payable(user), IERC20(address(token)), amount, fee, kappa); + expectBalances({ + bridgeBalance: initialLockedBalance - amount + fee, + userBalance: amount - fee, + bridgeFees: fee + }); + assertTrue(bridge.kappaExists(kappa)); + } + + function test_withdrawAndRemove() public withWithdrawToken { + expectWithdrawAndRemoveEvent(); + vm.prank(nodeGroup); + // Use swapMinAmount > 0 so that it exceeds calculateRemoveLiquidityOneToken = 0 (swapSuccess = false). + bridge.withdrawAndRemove(payable(user), IERC20(address(token)), amount, fee, ISwap(pool), 0, 1, 0, kappa); + expectBalances({ + bridgeBalance: initialLockedBalance - amount + fee, + userBalance: amount - fee, + bridgeFees: fee + }); + assertTrue(bridge.kappaExists(kappa)); + } + + function test_withdrawAndRemove_reverts_withRevertingPool() public withRevertingPool { + vm.expectRevert(bytes("GM")); + vm.prank(nodeGroup); + bridge.withdrawAndRemove(payable(user), IERC20(address(token)), amount, fee, ISwap(pool), 0, 1, 0, kappa); + } + + /// @notice Should behave the same way as the legacy workflow. + function test_withdraw_legacySendDisabled() public withLegacySendDisabled { + test_withdraw(); + } + + /// @notice Should ignore andRemove instructions in legacySendDisabled mode. + function test_withdrawAndRemove_legacySendDisabled_withdrawFallback() + public + withLegacySendDisabled + withWithdrawToken + { + expectWithdrawEvent(); + vm.prank(nodeGroup); + bridge.withdrawAndRemove(payable(user), IERC20(address(token)), amount, fee, ISwap(pool), 0, 1, 0, kappa); + expectBalances({ + bridgeBalance: initialLockedBalance - amount + fee, + userBalance: amount - fee, + bridgeFees: fee + }); + assertTrue(bridge.kappaExists(kappa)); + } + + /// @notice Pool is never called in legacySendDisabled mode, so should be identical to withdraw fallback. + function test_withdrawAndRemove_legacySendDisabled_withdrawFallback_withRevertingPool() public withRevertingPool { + test_withdrawAndRemove_legacySendDisabled_withdrawFallback(); + } +} From 2d66d6989267bfb18ede55d6bbcd0cf8661b8ac5 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 18:01:20 +0100 Subject: [PATCH 13/33] feat: fallbacks to regular mint/withdraw --- contracts/bridge/SynapseBridge.sol | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index ae530f267..e7e2ffbb3 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -221,6 +221,20 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) external nonReentrant whenNotPaused { + _withdraw(to, token, amount, fee, kappa); + } + + /** + * @dev Common internal logic for withdraw and withdrawAndRemove (once legacy workflows are disabled). + * Note: reentrancy and pausability checks are handled outside of this function. + */ + function _withdraw( + address to, + IERC20 token, + uint256 amount, + uint256 fee, + bytes32 kappa + ) internal { require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); require(amount > fee, "Amount must be greater than fee"); require(!kappaMap[kappa], "Kappa is already present"); @@ -253,6 +267,20 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) external nonReentrant whenNotPaused { + _mint(to, token, amount, fee, kappa); + } + + /** + * @dev Common internal logic for mint and mintAndSwap (once legacy workflows are disabled). + * Note: reentrancy and pausability checks are handled outside of this function. + */ + function _mint( + address payable to, + IERC20Mintable token, + uint256 amount, + uint256 fee, + bytes32 kappa + ) internal { require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); require(amount > fee, "Amount must be greater than fee"); require(!kappaMap[kappa], "Kappa is already present"); @@ -362,6 +390,10 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 deadline, bytes32 kappa ) external nonReentrant whenNotPaused { + // Fallback to regular mint if legacy workflows are disabled. + if (isLegacySendDisabled) { + return _mint(to, token, amount, fee, kappa); + } require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); require(amount > fee, "Amount must be greater than fee"); require(!kappaMap[kappa], "Kappa is already present"); @@ -466,6 +498,10 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 swapDeadline, bytes32 kappa ) external nonReentrant whenNotPaused { + // Fallback to regular withdraw if legacy workflows are disabled. + if (isLegacySendDisabled) { + return _withdraw(to, token, amount, fee, kappa); + } require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); require(amount > fee, "Amount must be greater than fee"); require(!kappaMap[kappa], "Kappa is already present"); From c314e1d3f38dd6963c1f970fa61911fb92b2ee78 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 18:34:48 +0100 Subject: [PATCH 14/33] test: reentrancy cases --- test/bridge/legacy/ReenteringToken.sol | 41 +++++++++++ test/bridge/legacy/SynapseBridge.Dst.t.sol | 79 +++++++++++++++++++++- 2 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 test/bridge/legacy/ReenteringToken.sol diff --git a/test/bridge/legacy/ReenteringToken.sol b/test/bridge/legacy/ReenteringToken.sol new file mode 100644 index 000000000..6d1b15718 --- /dev/null +++ b/test/bridge/legacy/ReenteringToken.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; + +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; + +contract ReenteringToken is SynapseERC20 { + address internal target; + bytes internal data; + + function setReenteringData(address target_, bytes memory data_) public { + target = target_; + data = data_; + } + + function _transfer( + address sender, + address recipient, + uint256 amount + ) internal virtual override { + super._transfer(sender, recipient, amount); + _reenterTarget(); + } + + function _mint(address account, uint256 amount) internal virtual override { + super._mint(account, amount); + _reenterTarget(); + } + + function _reenterTarget() internal { + if (target != address(0)) { + address target_ = target; + bytes memory data_ = data; + delete target; + delete data; + Address.functionCall(target_, data_); + } + } +} diff --git a/test/bridge/legacy/SynapseBridge.Dst.t.sol b/test/bridge/legacy/SynapseBridge.Dst.t.sol index 498999b0e..861b75dbd 100644 --- a/test/bridge/legacy/SynapseBridge.Dst.t.sol +++ b/test/bridge/legacy/SynapseBridge.Dst.t.sol @@ -3,8 +3,8 @@ pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {SynapseBridge, IERC20, ERC20Burnable, IERC20Mintable, ISwap} from "../../../contracts/bridge/SynapseBridge.sol"; -import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; +import {ReenteringToken} from "./ReenteringToken.sol"; import {PoolMock} from "./PoolMock.sol"; import {Test} from "forge-std/Test.sol"; @@ -12,7 +12,7 @@ import {Test} from "forge-std/Test.sol"; // solhint-disable func-name-mixedcase contract SynapseBridgeLegacyDstTest is Test { SynapseBridge internal bridge; - SynapseERC20 internal token; + ReenteringToken internal token; address internal pool; address internal nodeGroup = makeAddr("NodeGroup"); @@ -49,6 +49,8 @@ contract SynapseBridgeLegacyDstTest is Test { bytes32 indexed kappa ); + event TokenDeposit(address indexed to, uint256 chainId, address token, uint256 amount); + modifier withMintToken() { token.grantRole(token.MINTER_ROLE(), address(bridge)); _; @@ -69,6 +71,13 @@ contract SynapseBridgeLegacyDstTest is Test { _; } + function prepareReentrancyData() public { + token.setReenteringData( + address(bridge), + abi.encodeWithSelector(bridge.deposit.selector, address(user), 1, address(token), 0) + ); + } + function expectMintEvent() public { vm.expectEmit(address(bridge)); emit TokenMint(user, address(token), amount - fee, fee, kappa); @@ -90,6 +99,11 @@ contract SynapseBridgeLegacyDstTest is Test { emit TokenWithdrawAndRemove(user, address(token), amount - fee, fee, 0, 1, 0, false, kappa); } + function expectReentrancyDepositEvent() public { + vm.expectEmit(address(bridge)); + emit TokenDeposit(user, 1, address(token), 0); + } + function expectBalances( uint256 bridgeBalance, uint256 userBalance, @@ -106,7 +120,7 @@ contract SynapseBridgeLegacyDstTest is Test { bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(this)); bridge.grantRole(bridge.NODEGROUP_ROLE(), nodeGroup); - token = new SynapseERC20(); + token = new ReenteringToken(); token.initialize("Test", "TST", 18, address(this)); pool = address(new PoolMock()); @@ -211,4 +225,63 @@ contract SynapseBridgeLegacyDstTest is Test { function test_withdrawAndRemove_legacySendDisabled_withdrawFallback_withRevertingPool() public withRevertingPool { test_withdrawAndRemove_legacySendDisabled_withdrawFallback(); } + + // ═════════════════════════════════════════════ TESTS: REENTRANCY ═════════════════════════════════════════════════ + + function test_setupReentrancyMint() public withMintToken { + token.grantRole(token.MINTER_ROLE(), address(this)); + prepareReentrancyData(); + expectReentrancyDepositEvent(); + token.mint(address(user), 0); + } + + function test_setupReentrancyTransfer() public withWithdrawToken { + prepareReentrancyData(); + expectReentrancyDepositEvent(); + token.transfer(address(user), 0); + } + + function test_mint_reverts_withReentrancy() public withMintToken { + prepareReentrancyData(); + vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.prank(nodeGroup); + bridge.mint(payable(user), IERC20Mintable(address(token)), amount, fee, kappa); + } + + function test_mintAndSwap_reverts_withReentrancy() public withMintToken { + prepareReentrancyData(); + vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.prank(nodeGroup); + bridge.mintAndSwap(payable(user), IERC20Mintable(address(token)), amount, fee, ISwap(pool), 0, 0, 1, 0, kappa); + } + + function test_mint_legacySendDisabled_reverts_withReentrancy() public withLegacySendDisabled { + test_mint_reverts_withReentrancy(); + } + + function test_mintAndSwap_legacySendDisabled_reverts_withReentrancy() public withLegacySendDisabled { + test_mintAndSwap_reverts_withReentrancy(); + } + + function test_withdraw_reverts_withReentrancy() public withWithdrawToken { + prepareReentrancyData(); + vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.prank(nodeGroup); + bridge.withdraw(payable(user), IERC20(address(token)), amount, fee, kappa); + } + + function test_withdrawAndRemove_reverts_withReentrancy() public withWithdrawToken { + prepareReentrancyData(); + vm.expectRevert("ReentrancyGuard: reentrant call"); + vm.prank(nodeGroup); + bridge.withdrawAndRemove(payable(user), IERC20(address(token)), amount, fee, ISwap(pool), 0, 1, 0, kappa); + } + + function test_withdraw_legacySendDisabled_reverts_withReentrancy() public withLegacySendDisabled { + test_withdraw_reverts_withReentrancy(); + } + + function test_withdrawAndRemove_legacySendDisabled_reverts_withReentrancy() public withLegacySendDisabled { + test_withdrawAndRemove_reverts_withReentrancy(); + } } From f9cda0698150d598094b4338abd3dc71e5a28509 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 18:37:42 +0100 Subject: [PATCH 15/33] test: node group caller only --- test/bridge/legacy/SynapseBridge.Dst.t.sol | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/test/bridge/legacy/SynapseBridge.Dst.t.sol b/test/bridge/legacy/SynapseBridge.Dst.t.sol index 861b75dbd..ea673c3ba 100644 --- a/test/bridge/legacy/SynapseBridge.Dst.t.sol +++ b/test/bridge/legacy/SynapseBridge.Dst.t.sol @@ -284,4 +284,56 @@ contract SynapseBridgeLegacyDstTest is Test { function test_withdrawAndRemove_legacySendDisabled_reverts_withReentrancy() public withLegacySendDisabled { test_withdrawAndRemove_reverts_withReentrancy(); } + + // ══════════════════════════════════════════ TESTS: NODE GROUP ONLY ═══════════════════════════════════════════════ + + function test_mint_reverts_callerNotNodeGroup(address caller) public withMintToken { + vm.assume(caller != nodeGroup); + vm.prank(caller); + vm.expectRevert("Caller is not a node group"); + bridge.mint(payable(user), IERC20Mintable(address(token)), amount, fee, kappa); + } + + function test_mintAndSwap_reverts_callerNotNodeGroup(address caller) public withMintToken { + vm.assume(caller != nodeGroup); + vm.prank(caller); + vm.expectRevert("Caller is not a node group"); + bridge.mintAndSwap(payable(user), IERC20Mintable(address(token)), amount, fee, ISwap(pool), 0, 0, 1, 0, kappa); + } + + function test_mint_legacySendDisabled_reverts_callerNotNodeGroup(address caller) public withLegacySendDisabled { + test_mint_reverts_callerNotNodeGroup(caller); + } + + function test_mintAndSwap_legacySendDisabled_reverts_callerNotNodeGroup(address caller) + public + withLegacySendDisabled + { + test_mintAndSwap_reverts_callerNotNodeGroup(caller); + } + + function test_withdraw_reverts_callerNotNodeGroup(address caller) public withWithdrawToken { + vm.assume(caller != nodeGroup); + vm.prank(caller); + vm.expectRevert("Caller is not a node group"); + bridge.withdraw(payable(user), IERC20(address(token)), amount, fee, kappa); + } + + function test_withdrawAndRemove_reverts_callerNotNodeGroup(address caller) public withWithdrawToken { + vm.assume(caller != nodeGroup); + vm.prank(caller); + vm.expectRevert("Caller is not a node group"); + bridge.withdrawAndRemove(payable(user), IERC20(address(token)), amount, fee, ISwap(pool), 0, 1, 0, kappa); + } + + function test_withdraw_legacySendDisabled_reverts_callerNotNodeGroup(address caller) public withLegacySendDisabled { + test_withdraw_reverts_callerNotNodeGroup(caller); + } + + function test_withdrawAndRemove_legacySendDisabled_reverts_callerNotNodeGroup(address caller) + public + withLegacySendDisabled + { + test_withdrawAndRemove_reverts_callerNotNodeGroup(caller); + } } From 880b8179e92b6a629d7e35cedd738a3ce9fc8823 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 18:59:49 +0100 Subject: [PATCH 16/33] test: withdrawFees cases --- test/bridge/legacy/SynapseBridge.Fees.t.sol | 70 +++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 test/bridge/legacy/SynapseBridge.Fees.t.sol diff --git a/test/bridge/legacy/SynapseBridge.Fees.t.sol b/test/bridge/legacy/SynapseBridge.Fees.t.sol new file mode 100644 index 000000000..175437f0a --- /dev/null +++ b/test/bridge/legacy/SynapseBridge.Fees.t.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseBridge, IERC20} from "../../../contracts/bridge/SynapseBridge.sol"; +import {ReenteringToken} from "./ReenteringToken.sol"; + +import {Test} from "forge-std/Test.sol"; + +contract Governance { + function withdrawFees(SynapseBridge bridge, address token) public { + bridge.withdrawFees(IERC20(token), address(this)); + } +} + +// solhint-disable func-name-mixedcase +contract SynapseBridgeLegacyFeesTest is Test { + SynapseBridge internal bridge; + ReenteringToken internal token; + Governance internal governance; + + uint256 internal feesAmount = 1 ether; + uint256 internal lockedAmount = 10 ether; + + function setUp() public { + governance = new Governance(); + bridge = new SynapseBridge(); + bridge.initialize(); + bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(governance)); + bridge.grantRole(bridge.NODEGROUP_ROLE(), address(this)); + + token = new ReenteringToken(); + token.initialize("Test", "TST", 18, address(this)); + token.grantRole(token.MINTER_ROLE(), address(this)); + + token.mint(address(bridge), lockedAmount); + // Withdraw to self to set up the fees without moving any tokens + bridge.withdraw(address(bridge), IERC20(address(token)), lockedAmount, feesAmount, 0); + } + + function test_withdrawFees() public { + governance.withdrawFees(bridge, address(token)); + assertEq(token.balanceOf(address(governance)), feesAmount); + assertEq(token.balanceOf(address(bridge)), lockedAmount - feesAmount); + assertEq(bridge.getFeeBalance(address(token)), 0); + } + + function test_withdrawFees_reentrancy() public { + // Governance reenters withdrawFees after receiving the fees + token.setReenteringData( + address(governance), + abi.encodeWithSelector(Governance.withdrawFees.selector, bridge, token) + ); + // Second withdrawFees should be with 0 fees, so exact same end state + test_withdrawFees(); + } + + function test_withdrawFees_reverts_notGovernance(address caller) public { + vm.assume(caller != address(governance)); + vm.prank(caller); + vm.expectRevert("Not governance"); + bridge.withdrawFees(IERC20(address(token)), address(1)); + } + + function test_withdrawFees_reverts_zeroRecipient() public { + vm.prank(address(governance)); + vm.expectRevert("Address is 0x000"); + bridge.withdrawFees(IERC20(address(token)), address(0)); + } +} From 82828e588e50bc2804a56f9e20fa9eab10887c45 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 30 May 2025 19:00:35 +0100 Subject: [PATCH 17/33] fix: reset fees before transfer --- contracts/bridge/SynapseBridge.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index e7e2ffbb3..020ea6b00 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -155,9 +155,10 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua function withdrawFees(IERC20 token, address to) external whenNotPaused { require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); require(to != address(0), "Address is 0x000"); - if (fees[address(token)] != 0) { - token.safeTransfer(to, fees[address(token)]); + uint256 amount = fees[address(token)]; + if (amount != 0) { fees[address(token)] = 0; + token.safeTransfer(to, amount); } } From 85d9566e3b7fefcacaa09ea5af9b684e56da6990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:24:04 +0100 Subject: [PATCH 18/33] fix: old repo tests (#338) * fix: update old tests for foundry 1.0 * fix: update integration tests to 1.0 --- script/integration/InspectIntegration.s.sol | 4 +-- test/messaging/AuthVerifier.t.sol | 3 +- test/messaging/GasFeePricing.t.sol | 10 +++---- test/messaging/MessageBusSender.t.sol | 33 ++++++++++----------- test/router/libs/UniversalTokenLib.t.sol | 4 --- 5 files changed, 23 insertions(+), 31 deletions(-) diff --git a/script/integration/InspectIntegration.s.sol b/script/integration/InspectIntegration.s.sol index 6d175f3b0..9165492fa 100644 --- a/script/integration/InspectIntegration.s.sol +++ b/script/integration/InspectIntegration.s.sol @@ -3,13 +3,13 @@ pragma solidity 0.8.17; import {IntegrationTest} from "../../test/utils/IntegrationTest.sol"; -import {console, Script} from "forge-std/Script.sol"; +import {console2, Script} from "forge-std/Script.sol"; contract InspectIntegration is Script { function run(string memory testContractName) external { IntegrationTest testContract = IntegrationTest(deployCode(testContractName)); // Log chain and contract name. Also log the "run-if-deployed" flag. - console.log( + console2.log( "%s %s %s", testContract.chainName(), testContract.contractName(), diff --git a/test/messaging/AuthVerifier.t.sol b/test/messaging/AuthVerifier.t.sol index 8fb86af04..392e0a723 100644 --- a/test/messaging/AuthVerifier.t.sol +++ b/test/messaging/AuthVerifier.t.sol @@ -20,7 +20,8 @@ contract AuthVerifierTest is Test { assertEq(authVerifier.nodegroup(), address(7331)); } - function testFailUnauthorizedNodeGroupSet() public { + function testUnauthorizedNodeGroupSetRevert() public { + vm.expectRevert("Ownable: caller is not the owner"); vm.prank(address(9999)); authVerifier.setNodeGroup(address(7331)); } diff --git a/test/messaging/GasFeePricing.t.sol b/test/messaging/GasFeePricing.t.sol index 7be91dc30..4733d73fd 100644 --- a/test/messaging/GasFeePricing.t.sol +++ b/test/messaging/GasFeePricing.t.sol @@ -25,7 +25,8 @@ contract GasFeePricingTest is Test { gasFeePricing = new GasFeePricing(); } - function testFailSetCostAsNotOwner() public { + function testSetCostAsNotOwnerRevert() public { + vm.expectRevert("Ownable: caller is not the owner"); vm.prank(address(0)); gasFeePricing.setCostPerChain(expectedDstChainId, expectedDstGasPrice, expectedGasTokenPriceRatio); } @@ -85,15 +86,12 @@ contract GasFeePricingTest is Test { assertEq(dstAddress, _address); } - function testFailRevertNoDstNativeAddress() public { + function testNoDstNativeAddressRevert() public { bytes memory options = gasFeePricing.encodeOptions(2, 300000, 100000000000000000, bytes32(0)); - + vm.expectRevert("dstNativeAddress empty"); (uint16 txType, uint256 gasLimit, uint256 dstAirdrop, bytes32 dstAddress) = gasFeePricing.decodeOptions( options ); - assertEq(txType, 2); - assertEq(gasLimit, 300000); - assertEq(dstAirdrop, 100000000000000000); } function testEstimateFeeWithOptionsTypeOne(uint64 _gasLimit) public { diff --git a/test/messaging/MessageBusSender.t.sol b/test/messaging/MessageBusSender.t.sol index 70698d519..966f983f9 100644 --- a/test/messaging/MessageBusSender.t.sol +++ b/test/messaging/MessageBusSender.t.sol @@ -50,38 +50,35 @@ contract MessageBusSenderTest is Test { } // Test fee query on an unset dstChain - function testFailUnsetEstimateFee() public { + function testUnsetEstimateFeeRevert() public { + vm.expectRevert("Fee not set"); messageBusSender.estimateFee(1, bytes("")); } - function testFailSendMessageWrongChainID() public { + function testSendMessageWrongChainIDRevert() public { bytes32 receiverAddress = addressToBytes32(address(1337)); // 99 is default foundry chain id + vm.expectRevert("Fee not set"); messageBusSender.sendMessage(receiverAddress, 99, bytes(""), bytes("")); } // Enforce fees above returned fee amount from fee calculator - function testFailSendMessageWithLowFees() public { - uint256 estimatedFee = messageBusSender.estimateFee(gasFeePricingTest.expectedDstChainId(), bytes("")); + function testSendMessageWithLowFeesRevert() public { + uint256 dstChainId = gasFeePricingTest.expectedDstChainId(); + uint256 estimatedFee = messageBusSender.estimateFee(dstChainId, bytes("")); bytes32 receiverAddress = addressToBytes32(address(1337)); - messageBusSender.sendMessage{value: estimatedFee - 1}( - receiverAddress, - gasFeePricingTest.expectedDstChainId(), - bytes(""), - bytes("") - ); + vm.expectRevert("Insuffient gas fee"); + messageBusSender.sendMessage{value: estimatedFee - 1}(receiverAddress, dstChainId, bytes(""), bytes("")); } // Fee calculator reverts upon 0 fees (Fee is unset) - function testFailMessageOnUnsetFees() public { - uint256 estimatedFee = messageBusSender.estimateFee(gasFeePricingTest.expectedDstChainId() - 1, bytes("")); + function testMessageOnUnsetFeesRevert() public { + uint256 dstChainId = gasFeePricingTest.expectedDstChainId() - 1; + vm.expectRevert("Fee not set"); + uint256 estimatedFee = messageBusSender.estimateFee(dstChainId, bytes("")); bytes32 receiverAddress = addressToBytes32(address(1337)); - messageBusSender.sendMessage{value: estimatedFee}( - receiverAddress, - gasFeePricingTest.expectedDstChainId() - 1, - bytes(""), - bytes("") - ); + vm.expectRevert("Fee not set"); + messageBusSender.sendMessage{value: estimatedFee}(receiverAddress, dstChainId, bytes(""), bytes("")); } // Send message without reversion, pay correct amount of fees, emit correct event diff --git a/test/router/libs/UniversalTokenLib.t.sol b/test/router/libs/UniversalTokenLib.t.sol index 29dfdf535..b8a53cb48 100644 --- a/test/router/libs/UniversalTokenLib.t.sol +++ b/test/router/libs/UniversalTokenLib.t.sol @@ -38,10 +38,6 @@ contract UniversalTokenLibraryTest is Test { // Should not revert, as the transfer is a noop due to the same recipient libHarness.universalTransfer(address(token), address(libHarness), amount); assertEq(token.balanceOf(address(libHarness)), amount); - // Trying to transfer to the harness should still revert - token.mint(address(this), amount); - vm.expectRevert("Disabled transfers to harness"); - token.transfer(address(libHarness), amount); } function testUniversalTransferETH() public { From f63c26d02bd73f0016f5a5ed0e513f4ff2d2c3dd Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:59:52 +0100 Subject: [PATCH 19/33] refactor: better separation of security checks --- contracts/bridge/SynapseBridge.sol | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index e7e2ffbb3..6615de51c 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -221,12 +221,15 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) external nonReentrant whenNotPaused { + require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); + require(amount > fee, "Amount must be greater than fee"); + require(!kappaMap[kappa], "Kappa is already present"); _withdraw(to, token, amount, fee, kappa); } /** * @dev Common internal logic for withdraw and withdrawAndRemove (once legacy workflows are disabled). - * Note: reentrancy and pausability checks are handled outside of this function. + * Note: all security checks are handled outside of this function. */ function _withdraw( address to, @@ -235,9 +238,6 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) internal { - require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); - require(amount > fee, "Amount must be greater than fee"); - require(!kappaMap[kappa], "Kappa is already present"); kappaMap[kappa] = true; fees[address(token)] = fees[address(token)].add(fee); if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) { @@ -267,12 +267,15 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) external nonReentrant whenNotPaused { + require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); + require(amount > fee, "Amount must be greater than fee"); + require(!kappaMap[kappa], "Kappa is already present"); _mint(to, token, amount, fee, kappa); } /** * @dev Common internal logic for mint and mintAndSwap (once legacy workflows are disabled). - * Note: reentrancy and pausability checks are handled outside of this function. + * Note: all security checks are handled outside of this function. */ function _mint( address payable to, @@ -281,9 +284,6 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 fee, bytes32 kappa ) internal { - require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); - require(amount > fee, "Amount must be greater than fee"); - require(!kappaMap[kappa], "Kappa is already present"); kappaMap[kappa] = true; fees[address(token)] = fees[address(token)].add(fee); emit TokenMint(to, token, amount.sub(fee), fee, kappa); @@ -390,13 +390,13 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 deadline, bytes32 kappa ) external nonReentrant whenNotPaused { + require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); + require(amount > fee, "Amount must be greater than fee"); + require(!kappaMap[kappa], "Kappa is already present"); // Fallback to regular mint if legacy workflows are disabled. if (isLegacySendDisabled) { return _mint(to, token, amount, fee, kappa); } - require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); - require(amount > fee, "Amount must be greater than fee"); - require(!kappaMap[kappa], "Kappa is already present"); kappaMap[kappa] = true; fees[address(token)] = fees[address(token)].add(fee); // first check to make sure more will be given than min amount required @@ -498,13 +498,13 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua uint256 swapDeadline, bytes32 kappa ) external nonReentrant whenNotPaused { + require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); + require(amount > fee, "Amount must be greater than fee"); + require(!kappaMap[kappa], "Kappa is already present"); // Fallback to regular withdraw if legacy workflows are disabled. if (isLegacySendDisabled) { return _withdraw(to, token, amount, fee, kappa); } - require(hasRole(NODEGROUP_ROLE, msg.sender), "Caller is not a node group"); - require(amount > fee, "Amount must be greater than fee"); - require(!kappaMap[kappa], "Kappa is already present"); kappaMap[kappa] = true; fees[address(token)] = fees[address(token)].add(fee); // first check to make sure more will be given than min amount required From c35907c166a984ccaacb0ef592ffdfaa1884fba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:53:26 +0100 Subject: [PATCH 20/33] SYN-106: minor suggestions (#337) * test: new events * test: setChainGasAmount should revert * fix: new events, setChainGasAmount revert * test: upgrade storage values * fix: properly deprecate chainGasAmount * refactor: separate constants vs storage --- contracts/bridge/SynapseBridge.sol | 16 +++-- .../bridge/legacy/SynapseBridge.Upgrade.t.sol | 69 +++++++++++++++++++ test/bridge/legacy/SynapseBridge.t.sol | 19 +++++ 3 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 test/bridge/legacy/SynapseBridge.Upgrade.t.sol diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index eec090470..3e91150ed 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -26,11 +26,14 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua bytes32 public constant NODEGROUP_ROLE = keccak256("NODEGROUP_ROLE"); bytes32 public constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE"); + uint256 public constant bridgeVersion = 8; + uint256 public constant chainGasAmount = 0; + mapping(address => uint256) private fees; uint256 public startBlockNumber; - uint256 public constant bridgeVersion = 8; - uint256 public chainGasAmount; + /// @dev This is a variable taking the storage slot of deprecated chainGasAmount to prevent storage gap + uint256 private _deprecatedChainGasAmount; address payable public WETH_ADDRESS; mapping(bytes32 => bool) private kappaMap; @@ -50,12 +53,12 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua } function setChainGasAmount(uint256 amount) external { - require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); - chainGasAmount = amount; + revert("Gas airdrop is disabled"); } function withdrawChainGas() external { require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); + emit ChainGasWithdrawn(msg.sender, address(this).balance); (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success, "ETH_TRANSFER_FAILED"); } @@ -63,6 +66,7 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua function setLegacySendDisabled(bool _isLegacySendDisabled) external { require(hasRole(GOVERNANCE_ROLE, msg.sender), "Not governance"); isLegacySendDisabled = _isLegacySendDisabled; + emit LegacySendDisabledSet(_isLegacySendDisabled); } function setWethAddress(address payable _wethAddress) external { @@ -137,6 +141,10 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua // v2 events event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount); + // New governance events + event LegacySendDisabledSet(bool isDisabled); + event ChainGasWithdrawn(address to, uint256 amount); + // VIEW FUNCTIONS ***/ function getFeeBalance(address tokenAddress) external view returns (uint256) { return fees[tokenAddress]; diff --git a/test/bridge/legacy/SynapseBridge.Upgrade.t.sol b/test/bridge/legacy/SynapseBridge.Upgrade.t.sol new file mode 100644 index 000000000..c9211be54 --- /dev/null +++ b/test/bridge/legacy/SynapseBridge.Upgrade.t.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseBridge} from "../../../contracts/bridge/SynapseBridge.sol"; + +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/TransparentUpgradeableProxy.sol"; +import {Test} from "forge-std/Test.sol"; + +// solhint-disable func-name-mixedcase +// TODO: rename to TestFork to remove this from CI workflow post-migration +contract SynapseBridgeUpgradeArbitrumTest is Test { + // 2025-06-05 + uint256 internal blockNumber = 344210000; + address payable internal bridge = 0x6F4e8eBa4D337f874Ab57478AcC2Cb5BACdc19c9; + address internal proxyAdmin = 0x432036208d2717394d2614d6697c46DF3Ed69540; + + uint256 internal expectedBridgeVersion = 6; + uint256 internal expectedChainGasAmount = 0.00001 ether; + string internal rpcUrl = "https://arbitrum-one.public.blastapi.io"; + + address internal newBridgeImplementation; + + address internal token = 0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a; + uint256 internal existingFees; + bytes32 internal kappa = 0xbdecec2b295b7ed28c44d9849c7dbf773516cbe0c219df850a10c4bcc6bbb7dd; + + address internal roleAdmin; + address internal governance; + address internal nodeGroup; + + function setUp() public { + vm.createSelectFork(rpcUrl, blockNumber); + newBridgeImplementation = address(new SynapseBridge()); + + existingFees = SynapseBridge(bridge).getFeeBalance(token); + roleAdmin = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).DEFAULT_ADMIN_ROLE(), 0); + governance = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).GOVERNANCE_ROLE(), 0); + nodeGroup = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).NODEGROUP_ROLE(), 0); + } + + function upgrade() public { + vm.prank(proxyAdmin); + TransparentUpgradeableProxy(bridge).upgradeTo(newBridgeImplementation); + } + + function test_getters() public { + assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).DEFAULT_ADMIN_ROLE(), 0), roleAdmin); + assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).GOVERNANCE_ROLE(), 0), governance); + assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).NODEGROUP_ROLE(), 0), nodeGroup); + + assertEq(SynapseBridge(bridge).bridgeVersion(), expectedBridgeVersion); + assertEq(SynapseBridge(bridge).chainGasAmount(), expectedChainGasAmount); + + assertEq(SynapseBridge(bridge).getFeeBalance(token), existingFees); + assertGt(existingFees, 0); + + assertTrue(SynapseBridge(bridge).kappaExists(kappa)); + assertFalse(SynapseBridge(bridge).kappaExists(kappa ^ bytes32(uint256(1)))); + } + + function test_upgrade() public { + upgrade(); + expectedBridgeVersion = 8; + expectedChainGasAmount = 0; + test_getters(); + assertFalse(SynapseBridge(bridge).isLegacySendDisabled()); + } +} diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index 212d9dd7f..c9b9639be 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -49,6 +49,9 @@ contract SynapseBridgeLegacyTest is Test { event TokenRedeemV2(bytes32 indexed to, uint256 chainId, address token, uint256 amount); + event LegacySendDisabledSet(bool isDisabled); + event ChainGasWithdrawn(address to, uint256 amount); + function setUp() public { bridge = new SynapseBridge(); bridge.initialize(); @@ -74,12 +77,16 @@ contract SynapseBridgeLegacyTest is Test { } function test_disableLegacySend() public { + vm.expectEmit(address(bridge)); + emit LegacySendDisabledSet(true); disableLegacySend(); assertTrue(bridge.isLegacySendDisabled()); } function test_enableLegacySend() public { disableLegacySend(); + vm.expectEmit(address(bridge)); + emit LegacySendDisabledSet(false); enableLegacySend(); assertFalse(bridge.isLegacySendDisabled()); } @@ -93,6 +100,8 @@ contract SynapseBridgeLegacyTest is Test { function test_withdrawChainGas() public { deal(address(bridge), 123456); + vm.expectEmit(address(bridge)); + emit ChainGasWithdrawn(governance, 123456); vm.prank(governance); bridge.withdrawChainGas(); assertEq(governance.balance, 123456); @@ -106,6 +115,16 @@ contract SynapseBridgeLegacyTest is Test { bridge.withdrawChainGas(); } + function test_setChainGasAmount_revertsAnyCaller(address caller) public { + vm.expectRevert("Gas airdrop is disabled"); + vm.prank(caller); + bridge.setChainGasAmount(123456); + } + + function test_setChainGasAmount_revertsGovernance() public { + test_setChainGasAmount_revertsAnyCaller(governance); + } + function test_deposit() public { vm.expectEmit(address(bridge)); emit TokenDeposit({to: address(1), chainId: 2, token: address(token), amount: 3}); From b7fb3694356fbf5bc274aafac9e97748e7d1b6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 27 Jun 2025 19:09:58 +0100 Subject: [PATCH 21/33] SYN-94: disable initializer in SynapseBridge implementation (#342) * test: use proxy in tests, impl initialize must revert * fix: prevent impl from being initialized * test: update older tests to use proxy pattern --- contracts/bridge/SynapseBridge.sol | 3 +++ script/bridge/DeploySynapseBridge.s.sol | 0 test/bridge/legacy/SynapseBridge.Dst.t.sol | 10 ++++---- test/bridge/legacy/SynapseBridge.Fees.t.sol | 12 ++++------ test/bridge/legacy/SynapseBridge.Proxy.t.sol | 25 ++++++++++++++++++++ test/bridge/legacy/SynapseBridge.t.sol | 9 ++++--- test/bridge/wrappers/MockSwap.t.sol | 5 +++- test/utils/Utilities06.sol | 4 +++- 8 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 script/bridge/DeploySynapseBridge.s.sol create mode 100644 test/bridge/legacy/SynapseBridge.Proxy.t.sol diff --git a/contracts/bridge/SynapseBridge.sol b/contracts/bridge/SynapseBridge.sol index 3e91150ed..bea6e7b18 100644 --- a/contracts/bridge/SynapseBridge.sol +++ b/contracts/bridge/SynapseBridge.sol @@ -44,6 +44,9 @@ contract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGua _; } + /// @dev We add initializer modifier to constructor to prevent implementation from being initialized + constructor() public initializer {} + receive() external payable {} function initialize() external initializer { diff --git a/script/bridge/DeploySynapseBridge.s.sol b/script/bridge/DeploySynapseBridge.s.sol new file mode 100644 index 000000000..e69de29bb diff --git a/test/bridge/legacy/SynapseBridge.Dst.t.sol b/test/bridge/legacy/SynapseBridge.Dst.t.sol index ea673c3ba..a7295eca1 100644 --- a/test/bridge/legacy/SynapseBridge.Dst.t.sol +++ b/test/bridge/legacy/SynapseBridge.Dst.t.sol @@ -6,12 +6,10 @@ import {SynapseBridge, IERC20, ERC20Burnable, IERC20Mintable, ISwap} from "../.. import {ReenteringToken} from "./ReenteringToken.sol"; import {PoolMock} from "./PoolMock.sol"; - -import {Test} from "forge-std/Test.sol"; +import {SynapseBridgeProxyTest} from "./SynapseBridge.Proxy.t.sol"; // solhint-disable func-name-mixedcase -contract SynapseBridgeLegacyDstTest is Test { - SynapseBridge internal bridge; +contract SynapseBridgeLegacyDstTest is SynapseBridgeProxyTest { ReenteringToken internal token; address internal pool; @@ -114,8 +112,8 @@ contract SynapseBridgeLegacyDstTest is Test { assertEq(bridge.getFeeBalance(address(token)), bridgeFees); } - function setUp() public { - bridge = new SynapseBridge(); + function setUp() public virtual override { + super.setUp(); bridge.initialize(); bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(this)); bridge.grantRole(bridge.NODEGROUP_ROLE(), nodeGroup); diff --git a/test/bridge/legacy/SynapseBridge.Fees.t.sol b/test/bridge/legacy/SynapseBridge.Fees.t.sol index 175437f0a..6739dd374 100644 --- a/test/bridge/legacy/SynapseBridge.Fees.t.sol +++ b/test/bridge/legacy/SynapseBridge.Fees.t.sol @@ -4,8 +4,7 @@ pragma experimental ABIEncoderV2; import {SynapseBridge, IERC20} from "../../../contracts/bridge/SynapseBridge.sol"; import {ReenteringToken} from "./ReenteringToken.sol"; - -import {Test} from "forge-std/Test.sol"; +import {SynapseBridgeProxyTest} from "./SynapseBridge.Proxy.t.sol"; contract Governance { function withdrawFees(SynapseBridge bridge, address token) public { @@ -14,18 +13,17 @@ contract Governance { } // solhint-disable func-name-mixedcase -contract SynapseBridgeLegacyFeesTest is Test { - SynapseBridge internal bridge; +contract SynapseBridgeLegacyFeesTest is SynapseBridgeProxyTest { ReenteringToken internal token; Governance internal governance; uint256 internal feesAmount = 1 ether; uint256 internal lockedAmount = 10 ether; - function setUp() public { - governance = new Governance(); - bridge = new SynapseBridge(); + function setUp() public virtual override { + super.setUp(); bridge.initialize(); + governance = new Governance(); bridge.grantRole(bridge.GOVERNANCE_ROLE(), address(governance)); bridge.grantRole(bridge.NODEGROUP_ROLE(), address(this)); diff --git a/test/bridge/legacy/SynapseBridge.Proxy.t.sol b/test/bridge/legacy/SynapseBridge.Proxy.t.sol new file mode 100644 index 000000000..9b6dc73a7 --- /dev/null +++ b/test/bridge/legacy/SynapseBridge.Proxy.t.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {Test} from "forge-std/Test.sol"; + +import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; +import {SynapseBridge} from "../../../contracts/bridge/SynapseBridge.sol"; + +// solhint-disable func-name-mixedcase +abstract contract SynapseBridgeProxyTest is Test { + SynapseBridge internal bridge; + address internal implementation; + + function setUp() public virtual { + implementation = address(new SynapseBridge()); + // Tests don't need to assume the exact proxy structure, so we can use a minimal proxy. + bridge = SynapseBridge(payable(Clones.clone(implementation))); + } + + function test_initialize_implementation_revert() public { + vm.expectRevert("Initializable: contract is already initialized"); + SynapseBridge(payable(implementation)).initialize(); + } +} diff --git a/test/bridge/legacy/SynapseBridge.t.sol b/test/bridge/legacy/SynapseBridge.t.sol index c9b9639be..4cca95334 100644 --- a/test/bridge/legacy/SynapseBridge.t.sol +++ b/test/bridge/legacy/SynapseBridge.t.sol @@ -5,11 +5,10 @@ pragma experimental ABIEncoderV2; import {SynapseBridge, IERC20, ERC20Burnable} from "../../../contracts/bridge/SynapseBridge.sol"; import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; -import {Test} from "forge-std/Test.sol"; +import {SynapseBridgeProxyTest} from "./SynapseBridge.Proxy.t.sol"; // solhint-disable func-name-mixedcase -contract SynapseBridgeLegacyTest is Test { - SynapseBridge internal bridge; +contract SynapseBridgeLegacyTest is SynapseBridgeProxyTest { SynapseERC20 internal token; address internal user = makeAddr("User"); @@ -52,8 +51,8 @@ contract SynapseBridgeLegacyTest is Test { event LegacySendDisabledSet(bool isDisabled); event ChainGasWithdrawn(address to, uint256 amount); - function setUp() public { - bridge = new SynapseBridge(); + function setUp() public virtual override { + super.setUp(); bridge.initialize(); bridge.grantRole(bridge.GOVERNANCE_ROLE(), governance); diff --git a/test/bridge/wrappers/MockSwap.t.sol b/test/bridge/wrappers/MockSwap.t.sol index 5688bfec2..2d82533c2 100644 --- a/test/bridge/wrappers/MockSwap.t.sol +++ b/test/bridge/wrappers/MockSwap.t.sol @@ -9,6 +9,8 @@ import "../../../contracts/bridge/wrappers/swap/MockSwap.sol"; import "../../../contracts/bridge/SynapseBridge.sol"; import "../../../contracts/bridge/SynapseERC20.sol"; +import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; + //solhint-disable func-name-mixedcase contract MockSwapTest is Test { MockSwap internal mockSwap; @@ -19,7 +21,8 @@ contract MockSwapTest is Test { function setUp() public { mockSwap = new MockSwap(); - bridge = new SynapseBridge(); + address implementation = address(new SynapseBridge()); + bridge = SynapseBridge(payable(Clones.clone(implementation))); bridge.initialize(); bridge.grantRole(bridge.NODEGROUP_ROLE(), address(this)); diff --git a/test/utils/Utilities06.sol b/test/utils/Utilities06.sol index 265a327d2..3c569832d 100644 --- a/test/utils/Utilities06.sol +++ b/test/utils/Utilities06.sol @@ -15,6 +15,7 @@ import {IWETH9} from "../../contracts/bridge/interfaces/IWETH9.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; contract ERC20Mock is ERC20, Ownable { constructor(string memory name_, uint8 decimals_) public ERC20(name_, name_) { @@ -185,7 +186,8 @@ contract Utilities06 is Test { } function deployBridge() public returns (SynapseBridge bridge) { - bridge = new SynapseBridge(); + address implementation = address(new SynapseBridge()); + bridge = SynapseBridge(payable(Clones.clone(implementation))); setupBridge(bridge); } From a67c932866da382a32a6932586d06fe6ec94ceb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Sun, 29 Jun 2025 19:22:37 +0100 Subject: [PATCH 22/33] SYN-94: deploy script (#343) * feat: add deployment script for consistent impl address * feat: bash utility to run on all chains --- foundry.toml | 42 ++++++++++++------------- script/bridge/DeploySynapseBridge.s.sol | 38 ++++++++++++++++++++++ script/bridge/deploy-implementation.sh | 29 +++++++++++++++++ script/templates/BasicUtils.sol | 6 ++-- 4 files changed, 91 insertions(+), 24 deletions(-) create mode 100755 script/bridge/deploy-implementation.sh diff --git a/foundry.toml b/foundry.toml index 2077f6f5c..65ce37391 100644 --- a/foundry.toml +++ b/foundry.toml @@ -52,30 +52,30 @@ op_sepolia = "${OP_SEPOLIA_API}" scroll_sepolia = "${SCROLL_SEPOLIA_API}" [etherscan] -arbitrum = { key = "${ARBITRUM_ETHERSCAN_KEY}", url = "${ARBITRUM_ETHERSCAN_URL}" } -# TODO: find out if this is correct -aurora = { key = "", url = "${AURORA_BLOCKSCOUT_URL}" } -avalanche = { key = "${AVALANCHE_ETHERSCAN_KEY}", url = "${AVALANCHE_ETHERSCAN_URL}" } -base = { key = "${BASE_ETHERSCAN_KEY}", url = "${BASE_ETHERSCAN_URL}" } -blast = { key = "${BLAST_ETHERSCAN_KEY}", url = "${BLAST_ETHERSCAN_URL}" } -boba = { key = "${BOBA_ETHERSCAN_KEY}", url = "${BOBA_ETHERSCAN_URL}" } -bsc = { key = "${BSC_ETHERSCAN_KEY}", url = "${BSC_ETHERSCAN_URL}" } -canto = { key = "", url = "${CANTO_BLOCKSCOUT_URL}" } -cronos = { key = "${CRONOS_ETHERSCAN_KEY}", url = "${CRONOS_ETHERSCAN_URL}" } +# Chains that are not currently using etherscan are commented out +arbitrum = { key = "${ARBITRUM_ETHERSCAN_KEY}", url = "${ARBITRUM_ETHERSCAN_URL}", chain = 42161 } +# aurora = { key = "", url = "${AURORA_BLOCKSCOUT_URL}" } +avalanche = { key = "${AVALANCHE_ETHERSCAN_KEY}", url = "${AVALANCHE_ETHERSCAN_URL}", chain = 43114 } +base = { key = "${BASE_ETHERSCAN_KEY}", url = "${BASE_ETHERSCAN_URL}", chain = 8453 } +blast = { key = "${BLAST_ETHERSCAN_KEY}", url = "${BLAST_ETHERSCAN_URL}", chain = 81457 } +# boba = { key = "${BOBA_ETHERSCAN_KEY}", url = "${BOBA_ETHERSCAN_URL}" } +bsc = { key = "${BSC_ETHERSCAN_KEY}", url = "${BSC_ETHERSCAN_URL}", chain = 56 } +# canto = { key = "", url = "${CANTO_BLOCKSCOUT_URL}" } +cronos = { key = "${CRONOS_ETHERSCAN_KEY}", url = "${CRONOS_ETHERSCAN_URL}", chain = 25 } # DFK is using Sourcify for verification -dogechain = { key = "", url = "${DOGECHAIN_BLOCKSCOUT_URL}" } -fantom = { key = "${FANTOM_ETHERSCAN_KEY}", url = "${FANTOM_ETHERSCAN_URL}" } +# dogechain = { key = "", url = "${DOGECHAIN_BLOCKSCOUT_URL}" } +# fantom = { key = "${FANTOM_ETHERSCAN_KEY}", url = "${FANTOM_ETHERSCAN_URL}" } # Harmony doesn't have an endpoint for verification, and Sourcify does not support Harmony # Klaytn doesn't have an endpoint for verification, and doesn't support Sourcify yet -linea = { key = "${LINEA_ETHERSCAN_KEY}", url = "${LINEA_ETHERSCAN_URL}" } -mainnet = { key = "${MAINNET_ETHERSCAN_KEY}", url = "${MAINNET_ETHERSCAN_URL}" } -metis = { key = "", url = "${METIS_BLOCKSCOUT_URL}" } -moonbeam = { key = "${MOONBEAM_ETHERSCAN_KEY}", url = "${MOONBEAM_ETHERSCAN_URL}" } -moonriver = { key = "${MOONRIVER_ETHERSCAN_KEY}", url = "${MOONRIVER_ETHERSCAN_URL}" } -optimism = { key = "${OPTIMISM_ETHERSCAN_KEY}", url = "${OPTIMISM_ETHERSCAN_URL}" } -polygon = { key = "${POLYGON_ETHERSCAN_KEY}", url = "${POLYGON_ETHERSCAN_URL}" } -scroll = { key = "${SCROLL_ETHERSCAN_KEY}", url = "${SCROLL_ETHERSCAN_URL}" } -zkevm = { key = "${ZKEVM_ETHERSCAN_KEY}", url = "${ZKEVM_ETHERSCAN_URL}" } +linea = { key = "${LINEA_ETHERSCAN_KEY}", url = "${LINEA_ETHERSCAN_URL}", chain = 59144 } +mainnet = { key = "${MAINNET_ETHERSCAN_KEY}", url = "${MAINNET_ETHERSCAN_URL}", chain = 1 } +# metis = { key = "", url = "${METIS_BLOCKSCOUT_URL}" } +moonbeam = { key = "${MOONBEAM_ETHERSCAN_KEY}", url = "${MOONBEAM_ETHERSCAN_URL}", chain = 1284 } +moonriver = { key = "${MOONRIVER_ETHERSCAN_KEY}", url = "${MOONRIVER_ETHERSCAN_URL}", chain = 1285 } +optimism = { key = "${OPTIMISM_ETHERSCAN_KEY}", url = "${OPTIMISM_ETHERSCAN_URL}", chain = 10 } +polygon = { key = "${POLYGON_ETHERSCAN_KEY}", url = "${POLYGON_ETHERSCAN_URL}", chain = 137 } +scroll = { key = "${SCROLL_ETHERSCAN_KEY}", url = "${SCROLL_ETHERSCAN_URL}", chain = 534532 } +zkevm = { key = "${ZKEVM_ETHERSCAN_KEY}", url = "${ZKEVM_ETHERSCAN_URL}", chain = 1101 } # Testnets arb_sepolia = { key = "${ARB_SEPOLIA_ETHERSCAN_KEY}", url = "${ARB_SEPOLIA_ETHERSCAN_URL}" } base_sepolia = { key = "${BASE_SEPOLIA_ETHERSCAN_KEY}", url = "${BASE_SEPOLIA_ETHERSCAN_URL}" } diff --git a/script/bridge/DeploySynapseBridge.s.sol b/script/bridge/DeploySynapseBridge.s.sol index e69de29bb..088fb5207 100644 --- a/script/bridge/DeploySynapseBridge.s.sol +++ b/script/bridge/DeploySynapseBridge.s.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseBridge} from "../../contracts/bridge/SynapseBridge.sol"; + +import {BasicSynapseScript, StringUtils} from "../templates/BasicSynapse.s.sol"; + +contract DeploySynapseBridge is BasicSynapseScript { + using StringUtils for string; + + // TODO: mine a create2 salt for this + bytes32 internal salt = 0; + + function run() external { + // Setup the BasicSynapseScript + setUp(); + address bridge = tryGetDeploymentAddress("SynapseBridge"); + if (bridge == address(0)) { + printLog(StringUtils.concat("🟡 Skipping: SynapseBridge is not deployed on ", activeChain)); + return; + } + vm.startBroadcast(); + address predicted = predictAddress(type(SynapseBridge).creationCode, salt); + printLog(StringUtils.concat("Predicted address: ", vm.toString(predicted))); + address deployed = deployAndSaveAs({ + contractName: "SynapseBridge", + contractAlias: "SynapseBridge.Implementation", + constructorArgs: "", + deployCode: deployCreate2 + }); + if (predicted != deployed) { + printLog(TAB.concat("❌ Predicted address mismatch")); + assert(false); + } + vm.stopBroadcast(); + } +} diff --git a/script/bridge/deploy-implementation.sh b/script/bridge/deploy-implementation.sh new file mode 100755 index 000000000..d1eaaa588 --- /dev/null +++ b/script/bridge/deploy-implementation.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# This script deploys the SynapseBridge implementation on all chains +# Usage: ./script/bridge/deploy-implementation.sh [] +# - name of the wallet to use for deployment + +# Colors +RED="\033[0;31m" +NC="\033[0m" # No Color + +WALLET_NAME=$1 +# Get the rest of the args +shift 1 +# Check that all required args exist +if [ -z "$WALLET_NAME" ]; then + echo -e "${RED}Usage: ./script/bridge/deploy-implementation.sh []${NC}" + exit 1 +fi + +# Make sure the script is run from the root of the project +PROJECT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../ && pwd) +cd "$PROJECT_ROOT" || exit 1 + +# Run the script on all chains with SynapseBridge deployment +# Look within deployments/chainName for SynapseBridge.json +for chainName in $(ls deployments); do + if [ -f "deployments/$chainName/SynapseBridge.json" ]; then + ./script/run.sh ./script/bridge/DeploySynapseBridge.s.sol "$chainName" "$WALLET_NAME" "$@" + fi +done diff --git a/script/templates/BasicUtils.sol b/script/templates/BasicUtils.sol index 5457dc763..0fc169f86 100644 --- a/script/templates/BasicUtils.sol +++ b/script/templates/BasicUtils.sol @@ -275,11 +275,11 @@ abstract contract BasicUtils is CommonBase { string memory pathOutput, string memory key ) internal returns (string memory fullInputData) { - // Example: jq .abi=$data.abi --argfile data path/to/input.json path/to/output.json + // Example: jq .abi=$data[0].abi --slurpfile data path/to/input.json path/to/output.json string[] memory inputs = new string[](6); inputs[0] = "jq"; - inputs[1] = key.concat(" = $data", key); - inputs[2] = "--argfile"; + inputs[1] = key.concat(" = $data[0]", key); + inputs[2] = "--slurpfile"; inputs[3] = "data"; inputs[4] = pathInput; inputs[5] = pathOutput; From 91d70fce88a8a9a12f486b821b9a7ea6c26352bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 10 Sep 2026 20:13:22 +0100 Subject: [PATCH 23/33] SYN-94: deploy new implementation (#344) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: update old deploy utility * refactor: rename SynapseBridge deployment files Renamed all SynapseBridge_*.json files to SynapseBridge.*.json format for consistency with naming conventions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * fix: skip zkEVM, set deployment salt * fix: foundry configs, check contract deployment * build: deploy new impl * test: more sanity checks in upgrade storage test * test: add labeling --------- Co-authored-by: Claude --- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../aurora/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../aurora/SynapseBridge_Implementation.json | 1776 ---------------- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../base/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../base/SynapseBridge_Implementation.json | 1776 ---------------- .../blast/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../blast/SynapseBridge_Implementation.json | 1777 ---------------- .../boba/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../boba/SynapseBridge_Implementation.json | 1776 ---------------- .../bsc/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../bsc/SynapseBridge_Implementation.json | 1776 ---------------- .../canto/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../canto/SynapseBridge_Implementation.json | 1776 ---------------- .../cronos/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../cronos/SynapseBridge_Implementation.json | 1776 ---------------- .../dfk/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../dfk/SynapseBridge_Implementation.json | 1776 ---------------- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../fantom/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../fantom/SynapseBridge_Implementation.json | 1776 ---------------- .../harmony/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../harmony/SynapseBridge_Implementation.json | 1776 ---------------- .../klatyn/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../klatyn/SynapseBridge_Implementation.json | 1776 ---------------- .../mainnet/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../mainnet/SynapseBridge_Implementation.json | 1776 ---------------- .../metis/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../metis/SynapseBridge_Implementation.json | 1776 ---------------- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../SynapseBridge_Implementation.json | 1776 ---------------- .../polygon/SynapseBridge.Implementation.json | 1395 +++++++++++++ ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 .../polygon/SynapseBridge_Implementation.json | 1792 ----------------- ...json => SynapseBridge.Implementation.json} | 0 ...ge_Proxy.json => SynapseBridge.Proxy.json} | 0 foundry.toml | 31 +- script/bridge/DeploySynapseBridge.s.sol | 13 +- script/networks.json | 2 +- script/utils/DeployScript.sol | 11 +- .../bridge/legacy/SynapseBridge.Upgrade.t.sol | 27 +- 67 files changed, 27940 insertions(+), 35581 deletions(-) create mode 100644 deployments/arbitrum/SynapseBridge.Implementation.json rename deployments/arbitrum/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/arbitrum/SynapseBridge_Implementation.json create mode 100644 deployments/aurora/SynapseBridge.Implementation.json rename deployments/aurora/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/aurora/SynapseBridge_Implementation.json create mode 100644 deployments/avalanche/SynapseBridge.Implementation.json rename deployments/avalanche/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/avalanche/SynapseBridge_Implementation.json create mode 100644 deployments/base/SynapseBridge.Implementation.json rename deployments/base/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/base/SynapseBridge_Implementation.json create mode 100644 deployments/blast/SynapseBridge.Implementation.json rename deployments/blast/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/blast/SynapseBridge_Implementation.json create mode 100644 deployments/boba/SynapseBridge.Implementation.json rename deployments/boba/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/boba/SynapseBridge_Implementation.json create mode 100644 deployments/bsc/SynapseBridge.Implementation.json rename deployments/bsc/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/bsc/SynapseBridge_Implementation.json create mode 100644 deployments/canto/SynapseBridge.Implementation.json rename deployments/canto/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/canto/SynapseBridge_Implementation.json create mode 100644 deployments/cronos/SynapseBridge.Implementation.json rename deployments/cronos/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/cronos/SynapseBridge_Implementation.json create mode 100644 deployments/dfk/SynapseBridge.Implementation.json rename deployments/dfk/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/dfk/SynapseBridge_Implementation.json create mode 100644 deployments/dogechain/SynapseBridge.Implementation.json rename deployments/dogechain/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/dogechain/SynapseBridge_Implementation.json create mode 100644 deployments/fantom/SynapseBridge.Implementation.json rename deployments/fantom/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/fantom/SynapseBridge_Implementation.json create mode 100644 deployments/harmony/SynapseBridge.Implementation.json rename deployments/harmony/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/harmony/SynapseBridge_Implementation.json create mode 100644 deployments/klatyn/SynapseBridge.Implementation.json rename deployments/klatyn/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/klatyn/SynapseBridge_Implementation.json create mode 100644 deployments/mainnet/SynapseBridge.Implementation.json rename deployments/mainnet/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/mainnet/SynapseBridge_Implementation.json create mode 100644 deployments/metis/SynapseBridge.Implementation.json rename deployments/metis/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/metis/SynapseBridge_Implementation.json create mode 100644 deployments/moonbeam/SynapseBridge.Implementation.json rename deployments/moonbeam/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/moonbeam/SynapseBridge_Implementation.json create mode 100644 deployments/moonriver/SynapseBridge.Implementation.json rename deployments/moonriver/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/moonriver/SynapseBridge_Implementation.json create mode 100644 deployments/optimism/SynapseBridge.Implementation.json rename deployments/optimism/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/optimism/SynapseBridge_Implementation.json create mode 100644 deployments/polygon/SynapseBridge.Implementation.json rename deployments/polygon/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) delete mode 100644 deployments/polygon/SynapseBridge_Implementation.json rename deployments/zkevm/{SynapseBridge_Implementation.json => SynapseBridge.Implementation.json} (100%) rename deployments/zkevm/{SynapseBridge_Proxy.json => SynapseBridge.Proxy.json} (100%) diff --git a/deployments/arbitrum/SynapseBridge.Implementation.json b/deployments/arbitrum/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/arbitrum/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/arbitrum/SynapseBridge_Proxy.json b/deployments/arbitrum/SynapseBridge.Proxy.json similarity index 100% rename from deployments/arbitrum/SynapseBridge_Proxy.json rename to deployments/arbitrum/SynapseBridge.Proxy.json diff --git a/deployments/arbitrum/SynapseBridge_Implementation.json b/deployments/arbitrum/SynapseBridge_Implementation.json deleted file mode 100644 index ccef9ef48..000000000 --- a/deployments/arbitrum/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x97a7af2A0323e2a40B866Df3A5F1F389427C9b68", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x3ea4b1eb7dba27be162c00ab736d162de6be1757b5dbb565ecbb9dbcc8a05a58", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x97a7af2A0323e2a40B866Df3A5F1F389427C9b68", - "transactionIndex": 0, - "gasUsed": "53260112", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf093e12f79d5b47ebd763f0032209e39521ea048e938d3e7e7a3ef9dae6df87b", - "transactionHash": "0x3ea4b1eb7dba27be162c00ab736d162de6be1757b5dbb565ecbb9dbcc8a05a58", - "logs": [], - "blockNumber": 6218636, - "cumulativeGasUsed": "25153192", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/aurora/SynapseBridge.Implementation.json b/deployments/aurora/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/aurora/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/aurora/SynapseBridge_Proxy.json b/deployments/aurora/SynapseBridge.Proxy.json similarity index 100% rename from deployments/aurora/SynapseBridge_Proxy.json rename to deployments/aurora/SynapseBridge.Proxy.json diff --git a/deployments/aurora/SynapseBridge_Implementation.json b/deployments/aurora/SynapseBridge_Implementation.json deleted file mode 100644 index b91a39d64..000000000 --- a/deployments/aurora/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xebDe9A95FC0d36bcf12037C6F234E4a51f64d223", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x45bb983e1333fd7704760e2e6ebb59305d11e4774f099321ad9d58950adfe8b5", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xebDe9A95FC0d36bcf12037C6F234E4a51f64d223", - "transactionIndex": 3, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x07ea795739baac2c931ba5b30adf2565ef5e045abdd48f878ceb7e1bed301a73", - "transactionHash": "0x45bb983e1333fd7704760e2e6ebb59305d11e4774f099321ad9d58950adfe8b5", - "logs": [], - "blockNumber": 59688400, - "cumulativeGasUsed": "0", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/avalanche/SynapseBridge.Implementation.json b/deployments/avalanche/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/avalanche/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/avalanche/SynapseBridge_Proxy.json b/deployments/avalanche/SynapseBridge.Proxy.json similarity index 100% rename from deployments/avalanche/SynapseBridge_Proxy.json rename to deployments/avalanche/SynapseBridge.Proxy.json diff --git a/deployments/avalanche/SynapseBridge_Implementation.json b/deployments/avalanche/SynapseBridge_Implementation.json deleted file mode 100644 index 44237b2d4..000000000 --- a/deployments/avalanche/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xA8240475Cc153944974DCE4D13C3b8E27effA8D5", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x02fa8719dfeec8a866c19656a7f25736f175f57ee749c2e1d0f6a382c30b5df0", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xA8240475Cc153944974DCE4D13C3b8E27effA8D5", - "transactionIndex": 16, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x941f7258938fa3bb00581742fef068d1d6aecf5aa0502959a2523e43b88192d9", - "transactionHash": "0x02fa8719dfeec8a866c19656a7f25736f175f57ee749c2e1d0f6a382c30b5df0", - "logs": [], - "blockNumber": 11021985, - "cumulativeGasUsed": "6337264", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/base/SynapseBridge.Implementation.json b/deployments/base/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/base/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/base/SynapseBridge_Proxy.json b/deployments/base/SynapseBridge.Proxy.json similarity index 100% rename from deployments/base/SynapseBridge_Proxy.json rename to deployments/base/SynapseBridge.Proxy.json diff --git a/deployments/base/SynapseBridge_Implementation.json b/deployments/base/SynapseBridge_Implementation.json deleted file mode 100644 index 30f678d67..000000000 --- a/deployments/base/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x84A420459cd31C3c34583F67E0f0fB191067D32f", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x36184a10ebf711bc265aff6329da03afc62ba2840764a7f2a478d92c012ebfc2", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x84A420459cd31C3c34583F67E0f0fB191067D32f", - "transactionIndex": 5, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x870337abf0c96d6f3d2faa1cd7f9445f949fc2cf31aac9d5e20243429c2be6ab", - "transactionHash": "0x36184a10ebf711bc265aff6329da03afc62ba2840764a7f2a478d92c012ebfc2", - "logs": [], - "blockNumber": 2047543, - "cumulativeGasUsed": "3592720", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "bcdbe4a55a6d4ad547497aad49959736", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(address indexed to, IERC20Mintable token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee));\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try ISwap(pool).swap(tokenIndexFrom, tokenIndexTo, amount.sub(fee), minDy, deadline) returns (\\n uint256 finalSwappedAmount\\n ) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(amount.sub(fee), swapTokenIndex);\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(amount.sub(fee), swapTokenIndex, swapMinAmount, swapDeadline)\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x37a91d25581e8acc16b044c82145f97d745f9db34b9cc7255fd1a25158116052\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getAPrecise() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n function swapStorage()\\n external\\n view\\n returns (\\n uint256 initialA,\\n uint256 futureA,\\n uint256 initialATime,\\n uint256 futureATime,\\n uint256 swapFee,\\n uint256 adminFee,\\n address lpToken\\n );\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)\\n external\\n view\\n returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xc74cbcf071e9a6e2b5c853915776f505d708a7ba9d9e8712e5c6b949eeeef480\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x881a430263bb5a33d32391aa01212ea0de1ede148753a5feaa0cf9deee3e6374\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122049d516c14532afa836f4ca2970409d5c8675becbfeec2d3c195bfabd37a76e3564736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122049d516c14532afa836f4ca2970409d5c8675becbfeec2d3c195bfabd37a76e3564736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 20606, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 20608, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 20613, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 20615, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 20619, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/blast/SynapseBridge.Implementation.json b/deployments/blast/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/blast/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/blast/SynapseBridge_Proxy.json b/deployments/blast/SynapseBridge.Proxy.json similarity index 100% rename from deployments/blast/SynapseBridge_Proxy.json rename to deployments/blast/SynapseBridge.Proxy.json diff --git a/deployments/blast/SynapseBridge_Implementation.json b/deployments/blast/SynapseBridge_Implementation.json deleted file mode 100644 index 9837b413f..000000000 --- a/deployments/blast/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1777 +0,0 @@ -{ - "address": "0xDCD8ccC9A726aB11C18ED3D2b78b71E6678E8222", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x43ebf73389b78812a2bf550f4d4f105a0fb61d429987c5bd3b390ba23bfbbc8a", - "receipt": { - "to": null, - "from": "0xfFaC66cc1215566e622FadF479bEeB0A03507E8f", - "contractAddress": "0xDCD8ccC9A726aB11C18ED3D2b78b71E6678E8222", - "transactionIndex": 12, - "gasUsed": "3462811", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7b5ff835913ef22091c6bf4f11e486cd8a3838da9043433716274fcd534bfcfb", - "transactionHash": "0x43ebf73389b78812a2bf550f4d4f105a0fb61d429987c5bd3b390ba23bfbbc8a", - "logs": [], - "blockNumber": 217597, - "cumulativeGasUsed": "5371294", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "69fd1f684227b51ce08f5e1aac3883c4", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(address indexed to, IERC20Mintable token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee));\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try ISwap(pool).swap(tokenIndexFrom, tokenIndexTo, amount.sub(fee), minDy, deadline) returns (\\n uint256 finalSwappedAmount\\n ) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(amount.sub(fee), swapTokenIndex);\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(amount.sub(fee), swapTokenIndex, swapMinAmount, swapDeadline)\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x37a91d25581e8acc16b044c82145f97d745f9db34b9cc7255fd1a25158116052\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getAPrecise() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n function swapStorage()\\n external\\n view\\n returns (\\n uint256 initialA,\\n uint256 futureA,\\n uint256 initialATime,\\n uint256 futureATime,\\n uint256 swapFee,\\n uint256 adminFee,\\n address lpToken\\n );\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)\\n external\\n view\\n returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xc74cbcf071e9a6e2b5c853915776f505d708a7ba9d9e8712e5c6b949eeeef480\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x881a430263bb5a33d32391aa01212ea0de1ede148753a5feaa0cf9deee3e6374\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122049d516c14532afa836f4ca2970409d5c8675becbfeec2d3c195bfabd37a76e3564736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122049d516c14532afa836f4ca2970409d5c8675becbfeec2d3c195bfabd37a76e3564736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 20606, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 20608, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 20613, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 20615, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 20619, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/boba/SynapseBridge.Implementation.json b/deployments/boba/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/boba/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/boba/SynapseBridge_Proxy.json b/deployments/boba/SynapseBridge.Proxy.json similarity index 100% rename from deployments/boba/SynapseBridge_Proxy.json rename to deployments/boba/SynapseBridge.Proxy.json diff --git a/deployments/boba/SynapseBridge_Implementation.json b/deployments/boba/SynapseBridge_Implementation.json deleted file mode 100644 index 88992528b..000000000 --- a/deployments/boba/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x9007A80247D23Cc5C213A6DAcB385c632c4e19F2", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc2c835f263a79ff466d5a5c532196842db7e599456a2e253b3565a1020842f26", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x9007A80247D23Cc5C213A6DAcB385c632c4e19F2", - "transactionIndex": 0, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x01a9a26ae92b26d0c4a625a83dc41a25ce5cff7d3e448e5267b44fc66457a409", - "transactionHash": "0xc2c835f263a79ff466d5a5c532196842db7e599456a2e253b3565a1020842f26", - "logs": [], - "blockNumber": 338131, - "cumulativeGasUsed": "3461819", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/bsc/SynapseBridge.Implementation.json b/deployments/bsc/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/bsc/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/bsc/SynapseBridge_Proxy.json b/deployments/bsc/SynapseBridge.Proxy.json similarity index 100% rename from deployments/bsc/SynapseBridge_Proxy.json rename to deployments/bsc/SynapseBridge.Proxy.json diff --git a/deployments/bsc/SynapseBridge_Implementation.json b/deployments/bsc/SynapseBridge_Implementation.json deleted file mode 100644 index d373b52b8..000000000 --- a/deployments/bsc/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x2264C28147BA42A687B5F223C8CaD704Fefc11be", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc259d3cf3b6522f1ae9be67680255803af417f1c3fe14fe4de3681c9bf1987e8", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x2264C28147BA42A687B5F223C8CaD704Fefc11be", - "transactionIndex": 15, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x407b68b6688fc69a933d8138746bb7eb93de7b84a43987e8c243c105a2f141ea", - "transactionHash": "0xc259d3cf3b6522f1ae9be67680255803af417f1c3fe14fe4de3681c9bf1987e8", - "logs": [], - "blockNumber": 15324382, - "cumulativeGasUsed": "4983949", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/canto/SynapseBridge.Implementation.json b/deployments/canto/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/canto/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/canto/SynapseBridge_Proxy.json b/deployments/canto/SynapseBridge.Proxy.json similarity index 100% rename from deployments/canto/SynapseBridge_Proxy.json rename to deployments/canto/SynapseBridge.Proxy.json diff --git a/deployments/canto/SynapseBridge_Implementation.json b/deployments/canto/SynapseBridge_Implementation.json deleted file mode 100644 index 9fb7e5717..000000000 --- a/deployments/canto/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xd5609cD0e1675331E4Fb1d43207C8d9D83AAb17C", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x7afb998098d3011586970394667878ad2c504737bbef7781a095bcec4b9fbe0e", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xd5609cD0e1675331E4Fb1d43207C8d9D83AAb17C", - "transactionIndex": 0, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7d0c50ae373b25524d0d92d0580b7bd4bc657f5f7a656a8a7471872f188a6ede", - "transactionHash": "0x7afb998098d3011586970394667878ad2c504737bbef7781a095bcec4b9fbe0e", - "logs": [], - "blockNumber": 1060202, - "cumulativeGasUsed": "3461819", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "b1c097dd2e38465ed4f4339b461de8a5", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(address indexed to, IERC20Mintable token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee));\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try ISwap(pool).swap(tokenIndexFrom, tokenIndexTo, amount.sub(fee), minDy, deadline) returns (\\n uint256 finalSwappedAmount\\n ) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(amount.sub(fee), swapTokenIndex);\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(amount.sub(fee), swapTokenIndex, swapMinAmount, swapDeadline)\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x37a91d25581e8acc16b044c82145f97d745f9db34b9cc7255fd1a25158116052\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)\\n external\\n view\\n returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xd0c99aea78f961e8fb903a44cddab1f054fe0261c024318ae4ab7062461e1353\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x881a430263bb5a33d32391aa01212ea0de1ede148753a5feaa0cf9deee3e6374\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 19139, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 19141, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 19146, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 19148, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 19152, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/cronos/SynapseBridge.Implementation.json b/deployments/cronos/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/cronos/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/cronos/SynapseBridge_Proxy.json b/deployments/cronos/SynapseBridge.Proxy.json similarity index 100% rename from deployments/cronos/SynapseBridge_Proxy.json rename to deployments/cronos/SynapseBridge.Proxy.json diff --git a/deployments/cronos/SynapseBridge_Implementation.json b/deployments/cronos/SynapseBridge_Implementation.json deleted file mode 100644 index c64fe1604..000000000 --- a/deployments/cronos/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x432036208d2717394d2614d6697c46DF3Ed69540", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x701b5145add64b42de6ac4a6c28fa33c80b0a632fde5c4ee20dc6671b1743308", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x432036208d2717394d2614d6697c46DF3Ed69540", - "transactionIndex": 1, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe74a3a6af6b3f49190828077b159a2bf2fca5d2d211aca9b4627fc7990bd361b", - "transactionHash": "0x701b5145add64b42de6ac4a6c28fa33c80b0a632fde5c4ee20dc6671b1743308", - "logs": [], - "blockNumber": 1578332, - "cumulativeGasUsed": "3687706", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/dfk/SynapseBridge.Implementation.json b/deployments/dfk/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/dfk/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/dfk/SynapseBridge_Proxy.json b/deployments/dfk/SynapseBridge.Proxy.json similarity index 100% rename from deployments/dfk/SynapseBridge_Proxy.json rename to deployments/dfk/SynapseBridge.Proxy.json diff --git a/deployments/dfk/SynapseBridge_Implementation.json b/deployments/dfk/SynapseBridge_Implementation.json deleted file mode 100644 index 4081ad3c8..000000000 --- a/deployments/dfk/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x159F2A9D7304Da210bE99F3d704B9823486DE24E", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x9ca7311961429552e72a8041f2f262a19b6a1493bae1b5e2e03e4bcb0e3481ac", - "receipt": { - "to": null, - "from": "0x235AF07E770f474d24F5bf73074735892371b40D", - "contractAddress": "0x159F2A9D7304Da210bE99F3d704B9823486DE24E", - "transactionIndex": 0, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x095a2e311576010830490b46be1774b4bf8b18743503d1479e7a8f25786b7cb2", - "transactionHash": "0x9ca7311961429552e72a8041f2f262a19b6a1493bae1b5e2e03e4bcb0e3481ac", - "logs": [], - "blockNumber": 65, - "cumulativeGasUsed": "3461819", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "cefd51132bfcd0aab10340ca057c092d", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is\\n Initializable,\\n AccessControlUpgradeable,\\n ReentrancyGuardUpgradeable,\\n PausableUpgradeable\\n{\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenWithdraw(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(\\n bytes32 indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress)\\n external\\n view\\n returns (uint256)\\n {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (\\n address(swappedTokenTo) == WETH_ADDRESS &&\\n WETH_ADDRESS != address(0)\\n ) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0xafc0c16c9cd37fe7a6b92f18e65d4084552bb27ea98ecba024b5f7fe83fbe252\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220c7ddf348db774832685d2f2e6488cabd308328f57ce2f579e76377741d2db00f64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220c7ddf348db774832685d2f2e6488cabd308328f57ce2f579e76377741d2db00f64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 19139, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 19141, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 19146, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 19148, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 19152, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/dogechain/SynapseBridge.Implementation.json b/deployments/dogechain/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/dogechain/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/dogechain/SynapseBridge_Proxy.json b/deployments/dogechain/SynapseBridge.Proxy.json similarity index 100% rename from deployments/dogechain/SynapseBridge_Proxy.json rename to deployments/dogechain/SynapseBridge.Proxy.json diff --git a/deployments/dogechain/SynapseBridge_Implementation.json b/deployments/dogechain/SynapseBridge_Implementation.json deleted file mode 100644 index 5efb1c524..000000000 --- a/deployments/dogechain/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x365ab2621b5a0402bbfa0f963ca29d974738fe33bdc5aed24f2e68632153e547", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b", - "transactionIndex": 9, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x43b33f3e6015971eba330ded3678535d67ed82570843c9185276cea853e13520", - "transactionHash": "0x365ab2621b5a0402bbfa0f963ca29d974738fe33bdc5aed24f2e68632153e547", - "logs": [], - "blockNumber": 947858, - "cumulativeGasUsed": "4389800", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "b1c097dd2e38465ed4f4339b461de8a5", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(address indexed to, IERC20Mintable token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee));\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try ISwap(pool).swap(tokenIndexFrom, tokenIndexTo, amount.sub(fee), minDy, deadline) returns (\\n uint256 finalSwappedAmount\\n ) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(amount.sub(fee), swapTokenIndex);\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(amount.sub(fee), swapTokenIndex, swapMinAmount, swapDeadline)\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x37a91d25581e8acc16b044c82145f97d745f9db34b9cc7255fd1a25158116052\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)\\n external\\n view\\n returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xd0c99aea78f961e8fb903a44cddab1f054fe0261c024318ae4ab7062461e1353\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x881a430263bb5a33d32391aa01212ea0de1ede148753a5feaa0cf9deee3e6374\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 19139, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 19141, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 19146, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 19148, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 19152, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/fantom/SynapseBridge.Implementation.json b/deployments/fantom/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/fantom/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/fantom/SynapseBridge_Proxy.json b/deployments/fantom/SynapseBridge.Proxy.json similarity index 100% rename from deployments/fantom/SynapseBridge_Proxy.json rename to deployments/fantom/SynapseBridge.Proxy.json diff --git a/deployments/fantom/SynapseBridge_Implementation.json b/deployments/fantom/SynapseBridge_Implementation.json deleted file mode 100644 index 47b057d8b..000000000 --- a/deployments/fantom/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xf46837caB330Fdb14943cee6a119D0e4FCb0C1D1", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xa91793fbfd7a7c4dc810963dc554a324de010b02c4dacf732233aa5e1a18b604", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xf46837caB330Fdb14943cee6a119D0e4FCb0C1D1", - "transactionIndex": 14, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x00014337000000f4e623b3b60475936ff41d1a173ec65ae80dbb10ed5c598edb", - "transactionHash": "0xa91793fbfd7a7c4dc810963dc554a324de010b02c4dacf732233aa5e1a18b604", - "logs": [], - "blockNumber": 31197624, - "cumulativeGasUsed": "5444000", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/harmony/SynapseBridge.Implementation.json b/deployments/harmony/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/harmony/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/harmony/SynapseBridge_Proxy.json b/deployments/harmony/SynapseBridge.Proxy.json similarity index 100% rename from deployments/harmony/SynapseBridge_Proxy.json rename to deployments/harmony/SynapseBridge.Proxy.json diff --git a/deployments/harmony/SynapseBridge_Implementation.json b/deployments/harmony/SynapseBridge_Implementation.json deleted file mode 100644 index 895e0212a..000000000 --- a/deployments/harmony/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xBe394900Ad6f64155318F8EaBE3708754dBAb95E", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x0b62537f96062854a19d505ce534ce8dec11a1d97f2169c9c1ce71414ef6c958", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xBe394900Ad6f64155318F8EaBE3708754dBAb95E", - "transactionIndex": 2, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9e2acf98d3faefb4bfaf49b0975078e63cffd53e7a370af863e2b86b7e312f0b", - "transactionHash": "0x0b62537f96062854a19d505ce534ce8dec11a1d97f2169c9c1ce71414ef6c958", - "logs": [], - "blockNumber": 23078594, - "cumulativeGasUsed": "3649253", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/klatyn/SynapseBridge.Implementation.json b/deployments/klatyn/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/klatyn/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/klatyn/SynapseBridge_Proxy.json b/deployments/klatyn/SynapseBridge.Proxy.json similarity index 100% rename from deployments/klatyn/SynapseBridge_Proxy.json rename to deployments/klatyn/SynapseBridge.Proxy.json diff --git a/deployments/klatyn/SynapseBridge_Implementation.json b/deployments/klatyn/SynapseBridge_Implementation.json deleted file mode 100644 index 754bc7613..000000000 --- a/deployments/klatyn/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x20B587484E75752Adac381aE577a7562E7f358c5", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x6ebddb90882fe13c5fea6228acb4b6071ea64f5b94e055cfc90f390202966405", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x20B587484E75752Adac381aE577a7562E7f358c5", - "transactionIndex": 6, - "gasUsed": "4805999", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x31e14aedc9a8653ae4b038af1a5af6a2ea6889fa0f4a866a7b4c4fc7c8ce3bd7", - "transactionHash": "0x6ebddb90882fe13c5fea6228acb4b6071ea64f5b94e055cfc90f390202966405", - "logs": [], - "blockNumber": 93622370, - "cumulativeGasUsed": "6350080", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "b1c097dd2e38465ed4f4339b461de8a5", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(address indexed to, IERC20Mintable token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(to, chainId, token, amount, tokenIndexFrom, tokenIndexTo, minDy, deadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(to, chainId, token, amount, swapTokenIndex, swapMinAmount, swapDeadline);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(tokenIndexFrom, tokenIndexTo, amount.sub(fee));\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try ISwap(pool).swap(tokenIndexFrom, tokenIndexTo, amount.sub(fee), minDy, deadline) returns (\\n uint256 finalSwappedAmount\\n ) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), \\\"Caller is not a node group\\\");\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(amount.sub(fee), swapTokenIndex);\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(amount.sub(fee), swapTokenIndex, swapMinAmount, swapDeadline)\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0x37a91d25581e8acc16b044c82145f97d745f9db34b9cc7255fd1a25158116052\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit) external view returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex)\\n external\\n view\\n returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xd0c99aea78f961e8fb903a44cddab1f054fe0261c024318ae4ab7062461e1353\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x881a430263bb5a33d32391aa01212ea0de1ede148753a5feaa0cf9deee3e6374\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220b8071a72b79daa27f6c3f8744460d87db0b2c8239a3e50f87b71da19da0b43cb64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 19139, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 19141, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 19146, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 19148, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 19152, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/mainnet/SynapseBridge.Implementation.json b/deployments/mainnet/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/mainnet/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/mainnet/SynapseBridge_Proxy.json b/deployments/mainnet/SynapseBridge.Proxy.json similarity index 100% rename from deployments/mainnet/SynapseBridge_Proxy.json rename to deployments/mainnet/SynapseBridge.Proxy.json diff --git a/deployments/mainnet/SynapseBridge_Implementation.json b/deployments/mainnet/SynapseBridge_Implementation.json deleted file mode 100644 index a846091f7..000000000 --- a/deployments/mainnet/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x31fe393815822edacBd81C2262467402199EFD0D", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xc9cd1d6e4e87b40dc7e5610dbba9787621a34d7cc4594cc68e6072dd73d5f6b9", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x31fe393815822edacBd81C2262467402199EFD0D", - "transactionIndex": 118, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x83a97ce59882c136ce4b55f4d3b756a01399f80df3f658eac484634fb57816fc", - "transactionHash": "0xc9cd1d6e4e87b40dc7e5610dbba9787621a34d7cc4594cc68e6072dd73d5f6b9", - "logs": [], - "blockNumber": 14221421, - "cumulativeGasUsed": "12910772", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/metis/SynapseBridge.Implementation.json b/deployments/metis/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/metis/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/metis/SynapseBridge_Proxy.json b/deployments/metis/SynapseBridge.Proxy.json similarity index 100% rename from deployments/metis/SynapseBridge_Proxy.json rename to deployments/metis/SynapseBridge.Proxy.json diff --git a/deployments/metis/SynapseBridge_Implementation.json b/deployments/metis/SynapseBridge_Implementation.json deleted file mode 100644 index 214c8368f..000000000 --- a/deployments/metis/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x6C8c6E68604e78B549C96907bfe9EBdaaC04e3B3", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x821b35a26890e213227e5761dc13f79858315308e0631f92a381d6cdde904e7a", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x6C8c6E68604e78B549C96907bfe9EBdaaC04e3B3", - "transactionIndex": 0, - "gasUsed": "32914859", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf86344807da3d014e09528cae5ae5b1eaa3940f300c892caa798095487ce99ea", - "transactionHash": "0x821b35a26890e213227e5761dc13f79858315308e0631f92a381d6cdde904e7a", - "logs": [], - "blockNumber": 1029277, - "cumulativeGasUsed": "32914859", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "527318de1d96a09115b475f409ebeef3", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/ISwap.sol\\\";\\nimport \\\"./interfaces/IWETH9.sol\\\";\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is\\n Initializable,\\n AccessControlUpgradeable,\\n ReentrancyGuardUpgradeable,\\n PausableUpgradeable\\n{\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256(\\\"NODEGROUP_ROLE\\\");\\n bytes32 public constant GOVERNANCE_ROLE = keccak256(\\\"GOVERNANCE_ROLE\\\");\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n\\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenWithdraw(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(\\n bytes32 indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress)\\n external\\n view\\n returns (uint256)\\n {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (\\n address(swappedTokenTo) == WETH_ADDRESS &&\\n WETH_ADDRESS != address(0)\\n ) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n true,\\n kappa\\n );\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant whenNotPaused {\\n require(\\n hasRole(NODEGROUP_ROLE, msg.sender),\\n \\\"Caller is not a node group\\\"\\n );\\n require(amount > fee, \\\"Amount must be greater than fee\\\");\\n require(!kappaMap[kappa], \\\"Kappa is already present\\\");\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n finalSwappedAmount,\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n true,\\n kappa\\n );\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(\\n to,\\n token,\\n amount.sub(fee),\\n fee,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline,\\n false,\\n kappa\\n );\\n }\\n }\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant whenNotPaused {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n}\\n\",\"keccak256\":\"0xafc0c16c9cd37fe7a6b92f18e65d4084552bb27ea98ecba024b5f7fe83fbe252\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220c7ddf348db774832685d2f2e6488cabd308328f57ce2f579e76377741d2db00f64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220c7ddf348db774832685d2f2e6488cabd308328f57ce2f579e76377741d2db00f64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 20046, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 20048, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 20053, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 20055, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 20059, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/moonbeam/SynapseBridge.Implementation.json b/deployments/moonbeam/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/moonbeam/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/moonbeam/SynapseBridge_Proxy.json b/deployments/moonbeam/SynapseBridge.Proxy.json similarity index 100% rename from deployments/moonbeam/SynapseBridge_Proxy.json rename to deployments/moonbeam/SynapseBridge.Proxy.json diff --git a/deployments/moonbeam/SynapseBridge_Implementation.json b/deployments/moonbeam/SynapseBridge_Implementation.json deleted file mode 100644 index 3b2a5b445..000000000 --- a/deployments/moonbeam/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xe1a77ce68DFf2f847c469b8c67Dc2A6d668D5E6F", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0xeb7a4e40ec4f69de21743ed5dc2b2270da24cc8d9749ffb94a4b65fc78886e31", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xe1a77ce68DFf2f847c469b8c67Dc2A6d668D5E6F", - "transactionIndex": 3, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x92077390073b9e69d3f5e608d2fb0ac16081d03cd01df0d3c351feea11105acf", - "transactionHash": "0xeb7a4e40ec4f69de21743ed5dc2b2270da24cc8d9749ffb94a4b65fc78886e31", - "logs": [], - "blockNumber": 425466, - "cumulativeGasUsed": "4354923", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/moonriver/SynapseBridge.Implementation.json b/deployments/moonriver/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/moonriver/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/moonriver/SynapseBridge_Proxy.json b/deployments/moonriver/SynapseBridge.Proxy.json similarity index 100% rename from deployments/moonriver/SynapseBridge_Proxy.json rename to deployments/moonriver/SynapseBridge.Proxy.json diff --git a/deployments/moonriver/SynapseBridge_Implementation.json b/deployments/moonriver/SynapseBridge_Implementation.json deleted file mode 100644 index 757a724c2..000000000 --- a/deployments/moonriver/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0xebDe9A95FC0d36bcf12037C6F234E4a51f64d223", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x44145cec576be0fc0df65e176c4b2509d50eef817d6a0451cfe8a653ed6d288e", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0xebDe9A95FC0d36bcf12037C6F234E4a51f64d223", - "transactionIndex": 0, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd041875bf189c17708f92513738d4fb4d016ee492bb1ab706e57934e54c6e5a6", - "transactionHash": "0x44145cec576be0fc0df65e176c4b2509d50eef817d6a0451cfe8a653ed6d288e", - "logs": [], - "blockNumber": 1493807, - "cumulativeGasUsed": "3461819", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/optimism/SynapseBridge.Implementation.json b/deployments/optimism/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/optimism/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/optimism/SynapseBridge_Proxy.json b/deployments/optimism/SynapseBridge.Proxy.json similarity index 100% rename from deployments/optimism/SynapseBridge_Proxy.json rename to deployments/optimism/SynapseBridge.Proxy.json diff --git a/deployments/optimism/SynapseBridge_Implementation.json b/deployments/optimism/SynapseBridge_Implementation.json deleted file mode 100644 index 45ad66725..000000000 --- a/deployments/optimism/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1776 +0,0 @@ -{ - "address": "0x7ef7560789eE2cB301eC38c3C8B91bA8a94Cd1e4", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x61de28c366cd6424e6714c3abd6065d3020582740cf3134cb521fc20b56f6638", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x7ef7560789eE2cB301eC38c3C8B91bA8a94Cd1e4", - "transactionIndex": 0, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x57a69a1c230abf5e4ed983d93ffb8cd431a4170205a79504e25c439fc8e66f02", - "transactionHash": "0x61de28c366cd6424e6714c3abd6065d3020582740cf3134cb521fc20b56f6638", - "logs": [], - "blockNumber": 3627175, - "cumulativeGasUsed": "3461819", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/polygon/SynapseBridge.Implementation.json b/deployments/polygon/SynapseBridge.Implementation.json new file mode 100644 index 000000000..51416ca36 --- /dev/null +++ b/deployments/polygon/SynapseBridge.Implementation.json @@ -0,0 +1,1395 @@ +{ + "address": "0x5B0000258c622551A1c7C45b9f860Ef90200005B", + "constructorArgs": "0x", + "abi": [ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GOVERNANCE_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NODEGROUP_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "WETH_ADDRESS", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address payable" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addKappas", + "inputs": [ + { + "name": "kappas", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "bridgeVersion", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getFeeBalance", + "inputs": [ + { + "name": "tokenAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isLegacySendDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "kappaExists", + "inputs": [ + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "redeem", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "contract ERC20Burnable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLegacySendDisabled", + "inputs": [ + { + "name": "_isLegacySendDisabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setWethAddress", + "inputs": [ + { + "name": "_wethAddress", + "type": "address", + "internalType": "address payable" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "startBlockNumber", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "contract ISwap" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawChainGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasWithdrawn", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacySendDisabledSet", + "inputs": [ + { + "name": "isDisabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDeposit", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDepositAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMint", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenMintAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20Mintable" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeem", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemAndSwap", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "minDy", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRedeemV2", + "inputs": [ + { + "name": "to", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdraw", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenWithdrawAndRemove", + "inputs": [ + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapTokenIndex", + "type": "uint8", + "indexed": false, + "internalType": "uint8" + }, + { + "name": "swapMinAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapDeadline", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "swapSuccess", + "type": "bool", + "indexed": false, + "internalType": "bool" + }, + { + "name": "kappa", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/SynapseBridge_Proxy.json b/deployments/polygon/SynapseBridge.Proxy.json similarity index 100% rename from deployments/polygon/SynapseBridge_Proxy.json rename to deployments/polygon/SynapseBridge.Proxy.json diff --git a/deployments/polygon/SynapseBridge_Implementation.json b/deployments/polygon/SynapseBridge_Implementation.json deleted file mode 100644 index 454edb212..000000000 --- a/deployments/polygon/SynapseBridge_Implementation.json +++ /dev/null @@ -1,1792 +0,0 @@ -{ - "address": "0x966e35C01842D029cFceDdc7a7fEB937C2F62A8a", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenDepositAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenMintAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "TokenRedeemAndSwap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenRedeemV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "swapSuccess", - "type": "bool" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "TokenWithdrawAndRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODEGROUP_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH_ADDRESS", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "kappas", - "type": "bytes32[]" - } - ], - "name": "addKappas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "depositAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getFeeBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "kappaExists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20Mintable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "mintAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - } - ], - "name": "redeemAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "tokenIndexFrom", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "tokenIndexTo", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "minDy", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "redeemAndSwap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "contract ERC20Burnable", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "redeemV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_wethAddress", - "type": "address" - } - ], - "name": "setWethAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "startBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "contract ISwap", - "name": "pool", - "type": "address" - }, - { - "internalType": "uint8", - "name": "swapTokenIndex", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "swapMinAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "swapDeadline", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "kappa", - "type": "bytes32" - } - ], - "name": "withdrawAndRemove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "withdrawFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "transactionHash": "0x96b6feacbb47ed1e0874a0c09a37987536dbd57f07d588580b0c503fc967b26a", - "receipt": { - "to": null, - "from": "0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9", - "contractAddress": "0x966e35C01842D029cFceDdc7a7fEB937C2F62A8a", - "transactionIndex": 10, - "gasUsed": "3461819", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000400000000110000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000040000000000000000000000000000000000000200000000000000000000080000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", - "blockHash": "0x0e16b47c1ce6b1c496be3739455c16c5490bf3480b102a74fa1d4ea88d815d97", - "transactionHash": "0x96b6feacbb47ed1e0874a0c09a37987536dbd57f07d588580b0c503fc967b26a", - "logs": [ - { - "transactionIndex": 10, - "blockNumber": 25033813, - "transactionHash": "0x96b6feacbb47ed1e0874a0c09a37987536dbd57f07d588580b0c503fc967b26a", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x0000000000000000000000000af91fa049a7e1894f480bfe5bba20142c6c29a9", - "0x0000000000000000000000007c7379531b2aee82e4ca06d4175d13b9cbeafd49" - ], - "data": "0x00000000000000000000000000000000000000000000000001ebf43dd49921f70000000000000000000000000000000000000000000000002d1e3a691864819d00000000000000000000000000000000000000000000a87080c14dee49315a060000000000000000000000000000000000000000000000002b32462b43cb5fa600000000000000000000000000000000000000000000a87082ad422c1dca7bfd", - "logIndex": 34, - "blockHash": "0x0e16b47c1ce6b1c496be3739455c16c5490bf3480b102a74fa1d4ea88d815d97" - } - ], - "blockNumber": 25033813, - "cumulativeGasUsed": "4296960", - "status": 1, - "byzantium": true - }, - "args": [], - "solcInputHash": "4918964388946807905c2e4a936b0b2c", - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenDepositAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenMintAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemAndSwap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenRedeemV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"swapSuccess\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"TokenWithdrawAndRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOVERNANCE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODEGROUP_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"kappas\",\"type\":\"bytes32[]\"}],\"name\":\"addKappas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainGasAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"depositAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getFeeBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"kappaExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Mintable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"mintAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexFrom\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"tokenIndexTo\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"minDy\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"redeemAndSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"contract ERC20Burnable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"redeemV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setChainGasAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_wethAddress\",\"type\":\"address\"}],\"name\":\"setWethAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"contract ISwap\",\"name\":\"pool\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"swapTokenIndex\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"swapMinAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapDeadline\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"kappa\",\"type\":\"bytes32\"}],\"name\":\"withdrawAndRemove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which chain to bridge assets onto\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to bridge assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"details\":\"This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"details\":\"This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\",\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain post-fees\",\"deadline\":\"Epoch time of the deadline that the swap is allowed to be executed.\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"minDy\":\"Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"Index of the SynERC20 asset in the pool\",\"tokenIndexTo\":\"Index of the desired final asset\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(address,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees\",\"chainId\":\"which underlying chain to bridge assets onto\",\"deadline\":\"latest timestamp to accept this transaction*\",\"minDy\":\"the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\",\"tokenIndexFrom\":\"the token the user wants to swap from\",\"tokenIndexTo\":\"the token the user wants to swap to\"}},\"redeemV2(bytes32,uint256,address,uint256)\":{\"params\":{\"amount\":\"Amount in native token decimals to transfer cross-chain pre-fees*\",\"chainId\":\"which underlying chain to bridge assets onto\",\"to\":\"address on other chain to redeem underlying assets to\",\"token\":\"ERC20 compatible token to deposit into the bridge\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"params\":{\"amount\":\"Amount in native token decimals to withdraw\",\"fee\":\"Amount in native token decimals to save to the contract as fees\",\"kappa\":\"kappa*\",\"pool\":\"Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\",\"swapDeadline\":\"Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\",\"swapMinAmount\":\"Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\",\"swapTokenIndex\":\"Specifies which of the underlying LP assets the nodes should attempt to redeem for\",\"to\":\"address on chain to send underlying assets to\",\"token\":\"ERC20 compatible token to withdraw from the bridge\"}},\"withdrawFees(address,address)\":{\"params\":{\"to\":\"Address to send the fees to\",\"token\":\"ERC20 token in which fees acccumulated to transfer\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deposit(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes to transfers an ERC20 token cross-chain\"},\"depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\"},\"mint(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\"},\"mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\"},\"redeem(address,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\"},\"redeemV2(bytes32,uint256,address,uint256)\":{\"notice\":\"Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\"},\"withdraw(address,address,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)\":{\"notice\":\"Function to be called by the node group to withdraw the underlying assets from the contract\"},\"withdrawFees(address,address)\":{\"notice\":\"withdraw specified ERC20 token fees to a given address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/bridge/SynapseBridge.sol\":\"SynapseBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {\\n function __AccessControl_init() internal initializer {\\n __Context_init_unchained();\\n __AccessControl_init_unchained();\\n }\\n\\n function __AccessControl_init_unchained() internal initializer {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n using AddressUpgradeable for address;\\n\\n struct RoleData {\\n EnumerableSetUpgradeable.AddressSet members;\\n bytes32 adminRole;\\n }\\n\\n mapping (bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view returns (bool) {\\n return _roles[role].members.contains(account);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n return _roles[role].members.length();\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n return _roles[role].members.at(index);\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to grant\\\");\\n\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual {\\n require(hasRole(_roles[role].adminRole, _msgSender()), \\\"AccessControl: sender must be an admin to revoke\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n _roles[role].adminRole = adminRole;\\n }\\n\\n function _grantRole(bytes32 role, address account) private {\\n if (_roles[role].members.add(account)) {\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n function _revokeRole(bytes32 role, address account) private {\\n if (_roles[role].members.remove(account)) {\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xa3c77c9ea6b47301c7ab5bf3addc1d809d13a27a179c4629a1b55308e8633d14\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\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 GSN 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 ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal initializer {\\n __Context_init_unchained();\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal initializer {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x73bef0a5dec3efde8183c4858d90f683ed2771656c4329647b4d5b0f89498fd5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x46034cd5cca740f636345c8f7aebae0f78adfd4b70e31e6f888cccbe1086586e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20 {\\n using SafeMath for uint256;\\n\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n * a default value of 18.\\n *\\n * To select a different value for {decimals}, use {_setupDecimals}.\\n *\\n * All three of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = 18;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n * called.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Sets {decimals} to a value other than the default one of 18.\\n *\\n * WARNING: This function should only be called from the constructor. Most\\n * applications that interact with token contracts will not expect\\n * {decimals} to ever change, and may work incorrectly if it does.\\n */\\n function _setupDecimals(uint8 decimals_) internal virtual {\\n _decimals = decimals_;\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is Context, ERC20 {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Destroys `amount` tokens from the caller.\\n *\\n * See {ERC20-_burn}.\\n */\\n function burn(uint256 amount) public virtual {\\n _burn(_msgSender(), amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n * allowance.\\n *\\n * See {ERC20-_burn} and {ERC20-allowance}.\\n *\\n * Requirements:\\n *\\n * - the caller must have allowance for ``accounts``'s tokens of at least\\n * `amount`.\\n */\\n function burnFrom(address account, uint256 amount) public virtual {\\n uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account, _msgSender(), decreasedAllowance);\\n _burn(account, amount);\\n }\\n}\\n\",\"keccak256\":\"0x9c0eb3b0e11d2480d49991dc384f1e5f9c9b9967cc81944d50916a9b9c6c4984\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.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 SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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(IERC20 token, address spender, uint256 value) 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 // solhint-disable-next-line max-line-length\\n require((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(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <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 // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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 // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\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(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly\\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\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <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 GSN 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 payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/bridge/SynapseBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport '@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol';\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport './interfaces/ISwap.sol';\\nimport './interfaces/IWETH9.sol';\\n\\ninterface IERC20Mintable is IERC20 {\\n function mint(address to, uint256 amount) external;\\n}\\n\\ncontract SynapseBridge is Initializable, AccessControlUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Mintable;\\n using SafeMath for uint256;\\n\\n bytes32 public constant NODEGROUP_ROLE = keccak256('NODEGROUP_ROLE');\\n bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');\\n\\n mapping(address => uint256) private fees;\\n\\n uint256 public startBlockNumber;\\n uint256 public constant bridgeVersion = 6;\\n uint256 public chainGasAmount;\\n address payable public WETH_ADDRESS;\\n\\n mapping(bytes32 => bool) private kappaMap;\\n\\n receive() external payable {}\\n \\n function initialize() external initializer {\\n startBlockNumber = block.number;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n __AccessControl_init();\\n }\\n\\n function setChainGasAmount(uint256 amount) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n chainGasAmount = amount;\\n }\\n\\n function setWethAddress(address payable _wethAddress) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"Not admin\\\");\\n WETH_ADDRESS = _wethAddress;\\n }\\n\\n function addKappas(bytes32[] calldata kappas) external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n for (uint256 i = 0; i < kappas.length; ++i) {\\n kappaMap[kappas[i]] = true;\\n }\\n }\\n\\n event TokenDeposit(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n );\\n event TokenRedeem(address indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n event TokenWithdraw(address indexed to, IERC20 token, uint256 amount, uint256 fee, bytes32 indexed kappa);\\n event TokenMint(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 indexed kappa\\n );\\n event TokenDepositAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenMintAndSwap(\\n address indexed to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n event TokenRedeemAndSwap(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n );\\n event TokenRedeemAndRemove(\\n address indexed to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n );\\n event TokenWithdrawAndRemove(\\n address indexed to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bool swapSuccess,\\n bytes32 indexed kappa\\n );\\n\\n // v2 events\\n event TokenRedeemV2(bytes32 indexed to, uint256 chainId, IERC20 token, uint256 amount);\\n\\n // VIEW FUNCTIONS ***/\\n function getFeeBalance(address tokenAddress) external view returns (uint256) {\\n return fees[tokenAddress];\\n }\\n\\n function kappaExists(bytes32 kappa) external view returns (bool) {\\n return kappaMap[kappa];\\n }\\n\\n // FEE FUNCTIONS ***/\\n /**\\n * * @notice withdraw specified ERC20 token fees to a given address\\n * * @param token ERC20 token in which fees acccumulated to transfer\\n * * @param to Address to send the fees to\\n */\\n function withdrawFees(IERC20 token, address to) external whenNotPaused() {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n require(to != address(0), \\\"Address is 0x000\\\");\\n if (fees[address(token)] != 0) {\\n token.safeTransfer(to, fees[address(token)]);\\n fees[address(token)] = 0;\\n }\\n }\\n\\n // PAUSABLE FUNCTIONS ***/\\n function pause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _pause();\\n }\\n\\n function unpause() external {\\n require(hasRole(GOVERNANCE_ROLE, msg.sender), \\\"Not governance\\\");\\n _unpause();\\n }\\n\\n\\n /**\\n * @notice Relays to nodes to transfers an ERC20 token cross-chain\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function deposit(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDeposit(to, chainId, token, amount);\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeem(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeem(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function withdraw(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n if (address(token) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(amount.sub(fee));\\n (bool success, ) = to.call{value: amount.sub(fee)}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n } else {\\n emit TokenWithdraw(to, token, amount, fee, kappa);\\n token.safeTransfer(to, amount.sub(fee));\\n }\\n }\\n\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.\\n * @dev This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param kappa kappa\\n **/\\n function mint(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n emit TokenMint(to, token, amount.sub(fee), fee, kappa);\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n }\\n\\n /**\\n * @notice Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.\\n * @param to address on other chain to bridge assets to\\n * @param chainId which chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function depositAndSwap(\\n address to,\\n uint256 chainId,\\n IERC20 token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenDepositAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.safeTransferFrom(msg.sender, address(this), amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param tokenIndexFrom the token the user wants to swap from\\n * @param tokenIndexTo the token the user wants to swap to\\n * @param minDy the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.\\n * @param deadline latest timestamp to accept this transaction\\n **/\\n function redeemAndSwap(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndSwap(\\n to,\\n chainId,\\n token,\\n amount,\\n tokenIndexFrom,\\n tokenIndexTo,\\n minDy,\\n deadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \\\"swap\\\" out of the LP token)\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n **/\\n function redeemAndRemove(\\n address to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemAndRemove(\\n to,\\n chainId,\\n token,\\n amount,\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n );\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n /**\\n * @notice Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.\\n * @dev This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted\\n * @param to address on other chain to redeem underlying assets to\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain post-fees\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param tokenIndexFrom Index of the SynERC20 asset in the pool\\n * @param tokenIndexTo Index of the desired final asset\\n * @param minDy Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.\\n * @param deadline Epoch time of the deadline that the swap is allowed to be executed.\\n * @param kappa kappa\\n **/\\n function mintAndSwap(\\n address payable to,\\n IERC20Mintable token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 minDy,\\n uint256 deadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // Transfer gas airdrop\\n if (chainGasAmount != 0 && address(this).balance > chainGasAmount) {\\n to.call.value(chainGasAmount)(\\\"\\\");\\n }\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateSwap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee)\\n );\\n\\n if (expectedOutput >= minDy) {\\n // proceed with swap\\n token.mint(address(this), amount);\\n token.safeIncreaseAllowance(address(pool), amount);\\n try\\n ISwap(pool).swap(\\n tokenIndexFrom,\\n tokenIndexTo,\\n amount.sub(fee),\\n minDy,\\n deadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(tokenIndexTo);\\n if (address(swappedTokenTo) == WETH_ADDRESS && WETH_ADDRESS != address(0)) {\\n IWETH9(WETH_ADDRESS).withdraw(finalSwappedAmount);\\n (bool success, ) = to.call{value: finalSwappedAmount}(\\\"\\\");\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n } else {\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenMintAndSwap(to, token, finalSwappedAmount, fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, true, kappa);\\n }\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n } else {\\n token.mint(address(this), amount);\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenMintAndSwap(to, token, amount.sub(fee), fee, tokenIndexFrom, tokenIndexTo, minDy, deadline, false, kappa);\\n }\\n }\\n\\n /**\\n * @notice Function to be called by the node group to withdraw the underlying assets from the contract\\n * @param to address on chain to send underlying assets to\\n * @param token ERC20 compatible token to withdraw from the bridge\\n * @param amount Amount in native token decimals to withdraw\\n * @param fee Amount in native token decimals to save to the contract as fees\\n * @param pool Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.\\n * @param swapTokenIndex Specifies which of the underlying LP assets the nodes should attempt to redeem for\\n * @param swapMinAmount Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap\\n * @param swapDeadline Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token\\n * @param kappa kappa\\n **/\\n function withdrawAndRemove(\\n address to,\\n IERC20 token,\\n uint256 amount,\\n uint256 fee,\\n ISwap pool,\\n uint8 swapTokenIndex,\\n uint256 swapMinAmount,\\n uint256 swapDeadline,\\n bytes32 kappa\\n ) external nonReentrant() whenNotPaused() {\\n require(hasRole(NODEGROUP_ROLE, msg.sender), 'Caller is not a node group');\\n require(amount > fee, 'Amount must be greater than fee');\\n require(!kappaMap[kappa], 'Kappa is already present');\\n kappaMap[kappa] = true;\\n fees[address(token)] = fees[address(token)].add(fee);\\n // first check to make sure more will be given than min amount required\\n uint256 expectedOutput = ISwap(pool).calculateRemoveLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex\\n );\\n\\n if (expectedOutput >= swapMinAmount) {\\n token.safeIncreaseAllowance(address(pool), amount.sub(fee));\\n try\\n ISwap(pool).removeLiquidityOneToken(\\n amount.sub(fee),\\n swapTokenIndex,\\n swapMinAmount,\\n swapDeadline\\n )\\n returns (uint256 finalSwappedAmount) {\\n // Swap succeeded, transfer swapped asset\\n IERC20 swappedTokenTo = ISwap(pool).getToken(swapTokenIndex);\\n swappedTokenTo.safeTransfer(to, finalSwappedAmount);\\n emit TokenWithdrawAndRemove(to, token, finalSwappedAmount, fee, swapTokenIndex, swapMinAmount, swapDeadline, true, kappa);\\n } catch {\\n IERC20(token).safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n } else {\\n token.safeTransfer(to, amount.sub(fee));\\n emit TokenWithdrawAndRemove(to, token, amount.sub(fee), fee, swapTokenIndex, swapMinAmount, swapDeadline, false, kappa);\\n }\\n }\\n\\n\\n // BRIDGE FUNCTIONS TO HANDLE DIFF ADDRESSES\\n /**\\n * @notice Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain\\n * @param to address on other chain to redeem underlying assets to\\n * @param chainId which underlying chain to bridge assets onto\\n * @param token ERC20 compatible token to deposit into the bridge\\n * @param amount Amount in native token decimals to transfer cross-chain pre-fees\\n **/\\n function redeemV2(\\n bytes32 to,\\n uint256 chainId,\\n ERC20Burnable token,\\n uint256 amount\\n ) external nonReentrant() whenNotPaused() {\\n emit TokenRedeemV2(to, chainId, token, amount);\\n token.burnFrom(msg.sender, amount);\\n }\\n\\n}\\n\",\"keccak256\":\"0x8129c1c4162ae4d9945e5fbc89caed844a0cc3de36d61ac59f49b60178245fa8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/ISwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\n\\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\ninterface ISwap {\\n // pool data view functions\\n function getA() external view returns (uint256);\\n\\n function getToken(uint8 index) external view returns (IERC20);\\n\\n function getTokenIndex(address tokenAddress) external view returns (uint8);\\n\\n function getTokenBalance(uint8 index) external view returns (uint256);\\n\\n function getVirtualPrice() external view returns (uint256);\\n\\n // min return calculation functions\\n function calculateSwap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx\\n ) external view returns (uint256);\\n\\n function calculateTokenAmount(uint256[] calldata amounts, bool deposit)\\n external\\n view\\n returns (uint256);\\n\\n function calculateRemoveLiquidity(uint256 amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function calculateRemoveLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex\\n ) external view returns (uint256 availableTokenAmount);\\n\\n // state modifying functions\\n function initialize(\\n IERC20[] memory pooledTokens,\\n uint8[] memory decimals,\\n string memory lpTokenName,\\n string memory lpTokenSymbol,\\n uint256 a,\\n uint256 fee,\\n uint256 adminFee,\\n address lpTokenTargetAddress\\n ) external;\\n\\n function swap(\\n uint8 tokenIndexFrom,\\n uint8 tokenIndexTo,\\n uint256 dx,\\n uint256 minDy,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function addLiquidity(\\n uint256[] calldata amounts,\\n uint256 minToMint,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidity(\\n uint256 amount,\\n uint256[] calldata minAmounts,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n function removeLiquidityOneToken(\\n uint256 tokenAmount,\\n uint8 tokenIndex,\\n uint256 minAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n\\n function removeLiquidityImbalance(\\n uint256[] calldata amounts,\\n uint256 maxBurnAmount,\\n uint256 deadline\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0xb51eb389637b2b595a09cd95ea4167a6d945719be1bc127eafae07c06abd8ca8\",\"license\":\"MIT\"},\"contracts/bridge/interfaces/IWETH9.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.4.0;\\n\\ninterface IWETH9 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function balanceOf(address) external view returns (uint256);\\n\\n function allowance(address, address) external view returns (uint256);\\n\\n receive() external payable;\\n\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function approve(address guy, uint256 wad) external returns (bool);\\n\\n function transfer(address dst, uint256 wad) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 wad\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x081ebde11dad2210d382564d40336f914d3d621750645f23707ca1a92139dbe2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50613dcd806100206000396000f3fe60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "deployedBytecode": "0x60806040526004361061021d5760003560e01c806391d148541161011d578063ca15c873116100b0578063e7a599981161007f578063f36c8f5c11610064578063f36c8f5c1461093b578063f3befd0114610950578063f3f094a11461096557610224565b8063e7a5999814610883578063f25552781461090057610224565b8063ca15c8731461079f578063d547741f146107c9578063d57eafac14610802578063e00a83e01461086e57610224565b8063a96e2423116100ec578063a96e2423146106fa578063ac8656261461072d578063b250fe6b14610742578063c78f68031461076c57610224565b806391d1485414610600578063a07ed97514610639578063a217fddf1461067e578063a2a2af0b1461069357610224565b806336e712ed116101b05780638129fc1c1161017f5780638456cb59116101645780638456cb59146105745780639010d07c1461058957806390d25074146105b957610224565b80638129fc1c146104f8578063839ed90a1461050d57610224565b806336e712ed1461045d5780633f4ba83a146104b9578063498a4c2d146104ce5780635c975abb146104e357610224565b8063248a9ca3116101ec578063248a9ca3146103715780632f2ff15d146103ad5780632fe87b95146103e657806336568abe1461042457610224565b8063040141e514610229578063173578921461025a5780631cf5f07f146102d357806320d7b3271461032257610224565b3661022457005b600080fd5b34801561023557600080fd5b5061023e6109ac565b604080516001600160a01b039092168252519081900360200190f35b34801561026657600080fd5b506102d1600480360361014081101561027e57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a082013581169160c08101359091169060e0810135906101008101359061012001356109bb565b005b3480156102df57600080fd5b506102d1600480360360a08110156102f657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135611315565b34801561032e57600080fd5b506102d1600480360360a081101561034557600080fd5b506001600160a01b0381358116916020810135909116906040810135906060810135906080013561175e565b34801561037d57600080fd5b5061039b6004803603602081101561039457600080fd5b5035611b04565b60408051918252519081900360200190f35b3480156103b957600080fd5b506102d1600480360360408110156103d057600080fd5b50803590602001356001600160a01b0316611b19565b3480156103f257600080fd5b506104106004803603602081101561040957600080fd5b5035611b85565b604080519115158252519081900360200190f35b34801561043057600080fd5b506102d16004803603604081101561044757600080fd5b50803590602001356001600160a01b0316611b9a565b34801561046957600080fd5b506102d1600480360360e081101561048057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff6080820135169060a08101359060c00135611bfb565b3480156104c557600080fd5b506102d1611d91565b3480156104da57600080fd5b5061039b611e16565b3480156104ef57600080fd5b50610410611e1c565b34801561050457600080fd5b506102d1611e25565b34801561051957600080fd5b506102d1600480360361010081101561053157600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e00135611f18565b34801561058057600080fd5b506102d16120c9565b34801561059557600080fd5b5061023e600480360360408110156105ac57600080fd5b508035906020013561214c565b3480156105c557600080fd5b506102d1600480360360808110156105dc57600080fd5b506001600160a01b038135811691602081013591604082013516906060013561216d565b34801561060c57600080fd5b506104106004803603604081101561062357600080fd5b50803590602001356001600160a01b0316612291565b34801561064557600080fd5b506102d16004803603608081101561065c57600080fd5b508035906020810135906001600160a01b0360408201351690606001356122a9565b34801561068a57600080fd5b5061039b612435565b34801561069f57600080fd5b506102d160048036036101008110156106b757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060ff608082013581169160a08101359091169060c08101359060e0013561243a565b34801561070657600080fd5b506102d16004803603602081101561071d57600080fd5b50356001600160a01b0316612572565b34801561073957600080fd5b5061039b612608565b34801561074e57600080fd5b506102d16004803603602081101561076557600080fd5b503561260d565b34801561077857600080fd5b5061039b6004803603602081101561078f57600080fd5b50356001600160a01b031661268d565b3480156107ab57600080fd5b5061039b600480360360208110156107c257600080fd5b50356126a8565b3480156107d557600080fd5b506102d1600480360360408110156107ec57600080fd5b50803590602001356001600160a01b03166126bf565b34801561080e57600080fd5b506102d1600480360361012081101561082657600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135916080820135169060ff60a0820135169060c08101359060e0810135906101000135612718565b34801561087a57600080fd5b5061039b612cd1565b34801561088f57600080fd5b506102d1600480360360208110156108a657600080fd5b8101906020810181356401000000008111156108c157600080fd5b8201836020820111156108d357600080fd5b803590602001918460208302840111640100000000831117156108f557600080fd5b509092509050612cd7565b34801561090c57600080fd5b506102d16004803603604081101561092357600080fd5b506001600160a01b0381358116916020013516612da4565b34801561094757600080fd5b5061039b612f32565b34801561095c57600080fd5b5061039b612f56565b34801561097157600080fd5b506102d16004803603608081101561098857600080fd5b506001600160a01b0381358116916020810135916040820135169060600135612f7a565b60cc546001600160a01b031681565b60026065541415610a13576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555610a20611e1c565b15610a72576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b610a9c7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b610aed576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b868811610b41576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615610ba5576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038c16835260c9909152902054610bdf90886130e5565b6001600160a01b038a16600090815260c9602052604090205560cb5415801590610c0a575060cb5447115b15610c635760cb546040516001600160a01b038c169190600081818185875af1925050503d8060008114610c5a576040519150601f19603f3d011682016040523d82523d6000602084013e610c5f565b606091505b5050505b60006001600160a01b03871663a95b089f8787610c808d8d61313f565b6040518463ffffffff1660e01b8152600401808460ff1681526020018360ff168152602001828152602001935050505060206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d6020811015610cf257600080fd5b505190508381106111e557604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50610d91925050506001600160a01b038b16888b61319c565b6001600160a01b03871663916955868787610dac8d8d61313f565b88886040518663ffffffff1660e01b8152600401808660ff1681526020018560ff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015610e0657600080fd5b505af1925050508015610e2b57506040513d6020811015610e2657600080fd5b505160015b610eda57610e4e8b610e3d8b8b61313f565b6001600160a01b038d1691906132bb565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c610e858d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a36111e0565b6000886001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b505160cc549091506001600160a01b038083169116148015610f79575060cc546001600160a01b031615155b1561113c5760cc54604080517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b5050505060008d6001600160a01b03168360405180600001905060006040518083038185875af1925050503d806000811461104f576040519150601f19603f3d011682016040523d82523d6000602084013e611054565b606091505b50509050806110aa576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b848e6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658f868f8e8e8e8e600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a3506111dd565b6111506001600160a01b0382168e846132bb565b838d6001600160a01b03167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658e858e8d8d8d8d600160405180896001600160a01b031681526020018881526020018781526020018660ff1681526020018560ff16815260200184815260200183815260200182151581526020019850505050505050505060405180910390a35b50505b611303565b604080517f40c10f19000000000000000000000000000000000000000000000000000000008152306004820152602481018b905290516001600160a01b038c16916340c10f1991604480830192600092919082900301818387803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505061127b8b610e3d8a8c61313f90919063ffffffff16565b816001600160a01b038c167f4f56ec39e98539920503fd54ee56ae0cbebe9eb15aa778f18de67701eeae7c658c6112b28d8d61313f565b604080516001600160a01b03909316835260208301919091528181018d905260ff808c1660608401528a16608083015260a0820189905260c08201889052600060e083015251908190036101000190a35b50506001606555505050505050505050565b6002606554141561136d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561137a611e1c565b156113cc576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6113f67fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611447576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b81831161149b576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff16156114ff576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461153990836130e5565b6001600160a01b03808616600081815260c9602052604090209290925560cc5416148015611571575060cc546001600160a01b031615155b156116e35760cc546001600160a01b0316632e1a7d4d611591858561313f565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b506000925050506001600160a01b0386166115f6858561313f565b604051600081818185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b505090508061168d576040805162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015290519081900360640190fd5b604080516001600160a01b03878116825260208201879052818301869052915184928916917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a350611752565b604080516001600160a01b03868116825260208201869052818301859052915183928816917f8b0afdc777af6946e53045a4a75212769075d30455a212ac51c9b16f9c5c9b26919081900360600190a361175285611741858561313f565b6001600160a01b03871691906132bb565b50506001606555505050565b600260655414156117b6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556117c3611e1c565b15611815576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b61183f7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b611890576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b8183116118e4576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615611948576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038716835260c990915290205461198290836130e5565b6001600160a01b03808616600090815260c96020526040902091909155819086167fbf14b9fde87f6e1c29a7e0787ad1d0d64b4648d8ae63da21524d9fd0f283dd38866119cf878761313f565b604080516001600160a01b0390931683526020830191909152818101879052519081900360600190a3604080517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526024810185905290516001600160a01b038616916340c10f1991604480830192600092919082900301818387803b158015611a5f57600080fd5b505af1158015611a73573d6000803e3d6000fd5b50505050611a8e85611741848661313f90919063ffffffff16565b60cb5415801590611aa0575060cb5447115b156117525760cb546040516001600160a01b0387169190600081818185875af1925050503d8060008114611af0576040519150601f19603f3d011682016040523d82523d6000602084013e611af5565b606091505b50505050506001606555505050565b60009081526033602052604090206002015490565b600082815260336020526040902060020154611b3c90611b3761333b565b612291565b611b775760405162461bcd60e51b815260040180806020018281038252602f815260200180613c8c602f913960400191505060405180910390fd5b611b81828261333f565b5050565b600090815260cd602052604090205460ff1690565b611ba261333b565b6001600160a01b0316816001600160a01b031614611bf15760405162461bcd60e51b815260040180806020018281038252602f815260200180613d69602f913960400191505060405180910390fd5b611b8182826133a8565b60026065541415611c53576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611c60611e1c565b15611cb2576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518781526001600160a01b03878116602083015281830187905260ff861660608301526080820185905260a082018490529151918916917f9a7024cde1920aa50cdde09ca396229e8c4d530d5cfdc6233590def70a94408c9181900360c00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810186905290516001600160a01b038716916379cc679091604480830192600092919082900301818387803b158015611d7d57600080fd5b505af1158015611303573d6000803e3d6000fd5b611dbb7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b611e0c576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613411565b565b60ca5481565b60975460ff1690565b600054610100900460ff1680611e3e5750611e3e6134ba565b80611e4c575060005460ff16155b611e875760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ecf576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b4360ca55611ede600033611b77565b611ee66134cb565b8015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b50565b60026065541415611f70576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f7d611e1c565b15611fcf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f91f25e9be0134ec851830e0e76dc71e06f9dade75a9b84e9524071dbbc3194259181900360e00190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810187905290516001600160a01b038816916379cc679091604480830192600092919082900301818387803b1580156120a257600080fd5b505af11580156120b6573d6000803e3d6000fd5b5050600160655550505050505050505050565b6120f37f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612144576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b611e14613585565b60008281526033602052604081206121649083613615565b90505b92915050565b600260655414156121c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556121d2611e1c565b15612224576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fda5273705dbef4bf1b902a131c2eac086b7e1476a8ab0cb4da08af1fe1bd8e3b9181900360600190a26122866001600160a01b038316333084613621565b505060016065555050565b600082815260336020526040812061216490836136a9565b60026065541415612301576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561230e611e1c565b15612360576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384166020820152808201839052905185917f8e57e8c5fea426159af69d47eda6c5052c7605c9f70967cf749d4aa55b70b499919081900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b505af1158015612426573d6000803e3d6000fd5b50506001606555505050505050565b600081565b60026065541415612492576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561249f611e1c565b156124f1576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518881526001600160a01b03888116602083015281830188905260ff80881660608401528616608083015260a0820185905260c082018490529151918a16917f79c15604b92ef54d3f61f0c40caab8857927ca3d5092367163b4562c1699eb5f9181900360e00190a26124266001600160a01b038716333088613621565b61257d600033612291565b6125ce576040805162461bcd60e51b815260206004820152600960248201527f4e6f742061646d696e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60cc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600681565b6126377f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612688576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60cb55565b6001600160a01b0316600090815260c9602052604090205490565b6000818152603360205260408120612167906136be565b6000828152603360205260409020600201546126dd90611b3761333b565b611bf15760405162461bcd60e51b8152600401808060200182810382526030815260200180613ce16030913960400191505060405180910390fd5b60026065541415612770576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561277d611e1c565b156127cf576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127f97fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd33612291565b61284a576040805162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206973206e6f742061206e6f64652067726f7570000000000000604482015290519081900360640190fd5b85871161289e576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d7573742062652067726561746572207468616e2066656500604482015290519081900360640190fd5b600081815260cd602052604090205460ff1615612902576040805162461bcd60e51b815260206004820152601860248201527f4b6170706120697320616c72656164792070726573656e740000000000000000604482015290519081900360640190fd5b600081815260cd60209081526040808320805460ff191660011790556001600160a01b038b16835260c990915290205461293c90876130e5565b6001600160a01b03808a16600090815260c96020526040812092909255861663342a87a161296a8a8a61313f565b876040518363ffffffff1660e01b8152600401808381526020018260ff1681526020019250505060206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d60208110156129d357600080fd5b50519050838110612c33576129fd866129ec8a8a61313f565b6001600160a01b038c16919061319c565b6001600160a01b038616633e3a1560612a168a8a61313f565b8787876040518563ffffffff1660e01b8152600401808581526020018460ff168152602001838152602001828152602001945050505050602060405180830381600087803b158015612a6757600080fd5b505af1925050508015612a8c57506040513d6020811015612a8757600080fd5b505160015b612b3257612aaf8a612a9e8a8a61313f565b6001600160a01b038c1691906132bb565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612ae68c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a3612c2e565b6000876001600160a01b03166382b86600886040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d6020811015612ba557600080fd5b50519050612bbd6001600160a01b0382168d846132bb565b604080516001600160a01b038d81168252602082018590528183018c905260ff8a1660608301526080820189905260a08201889052600160c0830152915186928f16917fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d919081900360e00190a350505b612cc0565b612c418a612a9e8a8a61313f565b816001600160a01b038b167fc1a608d0f8122d014d03cc915a91d98cef4ebaf31ea3552320430cba05211b6d8b612c788c8c61313f565b604080516001600160a01b03909316835260208301919091528181018c905260ff8a1660608301526080820189905260a08201889052600060c0830152519081900360e00190a35b505060016065555050505050505050565b60cb5481565b612d017f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612d52576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b60005b81811015612d9f57600160cd6000858585818110612d6f57fe5b60209081029290920135835250810191909152604001600020805460ff1916911515919091179055600101612d55565b505050565b612dac611e1c565b15612dfe576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612e287f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb133612291565b612e79576040805162461bcd60e51b815260206004820152600e60248201527f4e6f7420676f7665726e616e6365000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612ed4576040805162461bcd60e51b815260206004820152601060248201527f4164647265737320697320307830303000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260c9602052604090205415611b81576001600160a01b038216600081815260c96020526040902054612f17919083906132bb565b506001600160a01b0316600090815260c96020526040812055565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b7fb5c00e6706c3d213edd70ff33717fac657eacc5fe161f07180cf1fcab13cc4cd81565b60026065541415612fd2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612fdf611e1c565b15613031576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b604080518481526001600160a01b0384811660208301528183018490529151918616917fdc5bad4651c5fbe9977a696aadc65996c468cde1448dd468ec0d83bf61c4b57c9181900360600190a2604080517f79cc67900000000000000000000000000000000000000000000000000000000081523360048201526024810183905290516001600160a01b038416916379cc679091604480830192600092919082900301818387803b15801561241257600080fd5b600082820183811015612164576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115613196576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061323282856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561320057600080fd5b505afa158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b5051906130e5565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506132b59085906136c9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612d9f9084906136c9565b3390565b6000828152603360205260409020613357908261377a565b15611b815761336461333b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526033602052604090206133c0908261378f565b15611b81576133cd61333b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b613419611e1c565b61346a576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61349d61333b565b604080516001600160a01b039092168252519081900360200190a1565b60006134c5306137a4565b15905090565b600054610100900460ff16806134e457506134e46134ba565b806134f2575060005460ff16155b61352d5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015613575576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61357d6137aa565b611ee66137aa565b61358d611e1c565b156135df576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861349d61333b565b60006121648383613884565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526132b59085906136c9565b6000612164836001600160a01b0384166138e8565b600061216782613900565b606061371e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166139049092919063ffffffff16565b805190915015612d9f5780806020019051602081101561373d57600080fd5b5051612d9f5760405162461bcd60e51b815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6000612164836001600160a01b03841661391d565b6000612164836001600160a01b038416613967565b3b151590565b600054610100900460ff16806137c357506137c36134ba565b806137d1575060005460ff16155b61380c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d11602e913960400191505060405180910390fd5b600054610100900460ff16158015611ee6576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790558015611f1557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b815460009082106138c65760405162461bcd60e51b8152600401808060200182810382526022815260200180613c6a6022913960400191505060405180910390fd5b8260000182815481106138d557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606139138484600085613a4b565b90505b9392505050565b600061392983836138e8565b61395f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612167565b506000612167565b60008181526001830160205260408120548015613a415783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80830191908101906000908790839081106139b857fe5b90600052602060002001549050808760000184815481106139d557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613a0557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612167565b6000915050612167565b606082471015613a8c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613cbb6026913960400191505060405180910390fd5b613a95856137a4565b613ae6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b4357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b06565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613ba5576040519150601f19603f3d011682016040523d82523d6000602084013e613baa565b606091505b5091509150613bba828286613bc5565b979650505050505050565b60608315613bd4575081613916565b825115613be45782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613c2e578181015183820152602001613c16565b50505050905090810190601f168015613c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220791401c9065b4e036b16526d63aa56f0204c0f71e968f091a2b0b127d967835b64736f6c634300060c0033", - "devdoc": { - "kind": "dev", - "methods": { - "deposit(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which chain to bridge assets onto", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to bridge assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "details": "This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "details": "This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted", - "params": { - "amount": "Amount in native token decimals to transfer cross-chain post-fees", - "deadline": "Epoch time of the deadline that the swap is allowed to be executed.", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "minDy": "Minumum amount (in final asset decimals) that must be swapped for, otherwise the user will receive the SynERC20.", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "Index of the SynERC20 asset in the pool", - "tokenIndexTo": "Index of the desired final asset" - } - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "redeem(address,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token*", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees", - "chainId": "which underlying chain to bridge assets onto", - "deadline": "latest timestamp to accept this transaction*", - "minDy": "the min amount the user would like to receive, or revert to only minting the SynERC20 token crosschain.", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge", - "tokenIndexFrom": "the token the user wants to swap from", - "tokenIndexTo": "the token the user wants to swap to" - } - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "params": { - "amount": "Amount in native token decimals to transfer cross-chain pre-fees*", - "chainId": "which underlying chain to bridge assets onto", - "to": "address on other chain to redeem underlying assets to", - "token": "ERC20 compatible token to deposit into the bridge" - } - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "params": { - "amount": "Amount in native token decimals to withdraw", - "fee": "Amount in native token decimals to save to the contract as fees", - "kappa": "kappa*", - "pool": "Destination chain's pool to use to swap SynERC20 -> Asset. The nodes determine this by using PoolConfig.sol.", - "swapDeadline": "Specificies the deadline that the nodes are allowed to try to redeem/swap the LP token", - "swapMinAmount": "Specifies the minimum amount of the underlying asset needed for the nodes to execute the redeem/swap", - "swapTokenIndex": "Specifies which of the underlying LP assets the nodes should attempt to redeem for", - "to": "address on chain to send underlying assets to", - "token": "ERC20 compatible token to withdraw from the bridge" - } - }, - "withdrawFees(address,address)": { - "params": { - "to": "Address to send the fees to", - "token": "ERC20 token in which fees acccumulated to transfer" - } - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "deposit(address,uint256,address,uint256)": { - "notice": "Relays to nodes to transfers an ERC20 token cross-chain" - }, - "depositAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user." - }, - "mint(address,address,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted." - }, - "mintAndSwap(address,address,uint256,uint256,address,uint8,uint8,uint256,uint256,bytes32)": { - "notice": "Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted." - }, - "redeem(address,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "redeemAndRemove(address,uint256,address,uint256,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemAndSwap(address,uint256,address,uint256,uint8,uint8,uint256,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g \"swap\" out of the LP token)" - }, - "redeemV2(bytes32,uint256,address,uint256)": { - "notice": "Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain" - }, - "withdraw(address,address,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawAndRemove(address,address,uint256,uint256,address,uint8,uint256,uint256,bytes32)": { - "notice": "Function to be called by the node group to withdraw the underlying assets from the contract" - }, - "withdrawFees(address,address)": { - "notice": "withdraw specified ERC20 token fees to a given address" - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 1286, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 1289, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 2325, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage" - }, - { - "astId": 43, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_roles", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_bytes32,t_struct(RoleData)39_storage)" - }, - { - "astId": 306, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2995, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_status", - "offset": 0, - "slot": "101", - "type": "t_uint256" - }, - { - "astId": 3038, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 2889, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_paused", - "offset": 0, - "slot": "151", - "type": "t_bool" - }, - { - "astId": 2980, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage" - }, - { - "astId": 25220, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "fees", - "offset": 0, - "slot": "201", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 25222, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "startBlockNumber", - "offset": 0, - "slot": "202", - "type": "t_uint256" - }, - { - "astId": 25227, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "chainGasAmount", - "offset": 0, - "slot": "203", - "type": "t_uint256" - }, - { - "astId": 25229, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "WETH_ADDRESS", - "offset": 0, - "slot": "204", - "type": "t_address_payable" - }, - { - "astId": 25233, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "kappaMap", - "offset": 0, - "slot": "205", - "type": "t_mapping(t_bytes32,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "base": "t_bytes32", - "encoding": "dynamic_array", - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)49_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_mapping(t_bytes32,t_bool)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => bool)", - "numberOfBytes": "32", - "value": "t_bool" - }, - "t_mapping(t_bytes32,t_struct(RoleData)39_storage)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", - "numberOfBytes": "32", - "value": "t_struct(RoleData)39_storage" - }, - "t_mapping(t_bytes32,t_uint256)": { - "encoding": "mapping", - "key": "t_bytes32", - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_struct(AddressSet)2652_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "astId": 2651, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_inner", - "offset": 0, - "slot": "0", - "type": "t_struct(Set)2387_storage" - } - ], - "numberOfBytes": "64" - }, - "t_struct(RoleData)39_storage": { - "encoding": "inplace", - "label": "struct AccessControlUpgradeable.RoleData", - "members": [ - { - "astId": 36, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "members", - "offset": 0, - "slot": "0", - "type": "t_struct(AddressSet)2652_storage" - }, - { - "astId": 38, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "adminRole", - "offset": 0, - "slot": "2", - "type": "t_bytes32" - } - ], - "numberOfBytes": "96" - }, - "t_struct(Set)2387_storage": { - "encoding": "inplace", - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "astId": 2382, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_values", - "offset": 0, - "slot": "0", - "type": "t_array(t_bytes32)dyn_storage" - }, - { - "astId": 2386, - "contract": "contracts/bridge/SynapseBridge.sol:SynapseBridge", - "label": "_indexes", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_bytes32,t_uint256)" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/zkevm/SynapseBridge_Implementation.json b/deployments/zkevm/SynapseBridge.Implementation.json similarity index 100% rename from deployments/zkevm/SynapseBridge_Implementation.json rename to deployments/zkevm/SynapseBridge.Implementation.json diff --git a/deployments/zkevm/SynapseBridge_Proxy.json b/deployments/zkevm/SynapseBridge.Proxy.json similarity index 100% rename from deployments/zkevm/SynapseBridge_Proxy.json rename to deployments/zkevm/SynapseBridge.Proxy.json diff --git a/foundry.toml b/foundry.toml index 65ce37391..4427eced4 100644 --- a/foundry.toml +++ b/foundry.toml @@ -52,33 +52,4 @@ op_sepolia = "${OP_SEPOLIA_API}" scroll_sepolia = "${SCROLL_SEPOLIA_API}" [etherscan] -# Chains that are not currently using etherscan are commented out -arbitrum = { key = "${ARBITRUM_ETHERSCAN_KEY}", url = "${ARBITRUM_ETHERSCAN_URL}", chain = 42161 } -# aurora = { key = "", url = "${AURORA_BLOCKSCOUT_URL}" } -avalanche = { key = "${AVALANCHE_ETHERSCAN_KEY}", url = "${AVALANCHE_ETHERSCAN_URL}", chain = 43114 } -base = { key = "${BASE_ETHERSCAN_KEY}", url = "${BASE_ETHERSCAN_URL}", chain = 8453 } -blast = { key = "${BLAST_ETHERSCAN_KEY}", url = "${BLAST_ETHERSCAN_URL}", chain = 81457 } -# boba = { key = "${BOBA_ETHERSCAN_KEY}", url = "${BOBA_ETHERSCAN_URL}" } -bsc = { key = "${BSC_ETHERSCAN_KEY}", url = "${BSC_ETHERSCAN_URL}", chain = 56 } -# canto = { key = "", url = "${CANTO_BLOCKSCOUT_URL}" } -cronos = { key = "${CRONOS_ETHERSCAN_KEY}", url = "${CRONOS_ETHERSCAN_URL}", chain = 25 } -# DFK is using Sourcify for verification -# dogechain = { key = "", url = "${DOGECHAIN_BLOCKSCOUT_URL}" } -# fantom = { key = "${FANTOM_ETHERSCAN_KEY}", url = "${FANTOM_ETHERSCAN_URL}" } -# Harmony doesn't have an endpoint for verification, and Sourcify does not support Harmony -# Klaytn doesn't have an endpoint for verification, and doesn't support Sourcify yet -linea = { key = "${LINEA_ETHERSCAN_KEY}", url = "${LINEA_ETHERSCAN_URL}", chain = 59144 } -mainnet = { key = "${MAINNET_ETHERSCAN_KEY}", url = "${MAINNET_ETHERSCAN_URL}", chain = 1 } -# metis = { key = "", url = "${METIS_BLOCKSCOUT_URL}" } -moonbeam = { key = "${MOONBEAM_ETHERSCAN_KEY}", url = "${MOONBEAM_ETHERSCAN_URL}", chain = 1284 } -moonriver = { key = "${MOONRIVER_ETHERSCAN_KEY}", url = "${MOONRIVER_ETHERSCAN_URL}", chain = 1285 } -optimism = { key = "${OPTIMISM_ETHERSCAN_KEY}", url = "${OPTIMISM_ETHERSCAN_URL}", chain = 10 } -polygon = { key = "${POLYGON_ETHERSCAN_KEY}", url = "${POLYGON_ETHERSCAN_URL}", chain = 137 } -scroll = { key = "${SCROLL_ETHERSCAN_KEY}", url = "${SCROLL_ETHERSCAN_URL}", chain = 534532 } -zkevm = { key = "${ZKEVM_ETHERSCAN_KEY}", url = "${ZKEVM_ETHERSCAN_URL}", chain = 1101 } -# Testnets -arb_sepolia = { key = "${ARB_SEPOLIA_ETHERSCAN_KEY}", url = "${ARB_SEPOLIA_ETHERSCAN_URL}" } -base_sepolia = { key = "${BASE_SEPOLIA_ETHERSCAN_KEY}", url = "${BASE_SEPOLIA_ETHERSCAN_URL}" } -eth_sepolia = { key = "${ETH_SEPOLIA_ETHERSCAN_KEY}", url = "${ETH_SEPOLIA_ETHERSCAN_URL}" } -op_sepolia = { key = "${OP_SEPOLIA_ETHERSCAN_KEY}", url = "${OP_SEPOLIA_ETHERSCAN_URL}" } -scroll_sepolia = { key = "${SCROLL_SEPOLIA_ETHERSCAN_KEY}", url = "${SCROLL_SEPOLIA_ETHERSCAN_URL}" } +# No entries required with Etherscan V2 \ No newline at end of file diff --git a/script/bridge/DeploySynapseBridge.s.sol b/script/bridge/DeploySynapseBridge.s.sol index 088fb5207..653f1efd7 100644 --- a/script/bridge/DeploySynapseBridge.s.sol +++ b/script/bridge/DeploySynapseBridge.s.sol @@ -2,33 +2,36 @@ pragma solidity 0.6.12; pragma experimental ABIEncoderV2; -import {SynapseBridge} from "../../contracts/bridge/SynapseBridge.sol"; - import {BasicSynapseScript, StringUtils} from "../templates/BasicSynapse.s.sol"; contract DeploySynapseBridge is BasicSynapseScript { using StringUtils for string; - // TODO: mine a create2 salt for this - bytes32 internal salt = 0; + bytes32 internal salt = 0x60b37663118720d6c967cd1be94aa5218f2440a06e95254b16d80a5ed3224c4c; + address internal predicted = 0x5B0000258c622551A1c7C45b9f860Ef90200005B; function run() external { // Setup the BasicSynapseScript setUp(); + if (activeChain.equals("zkevm")) { + printLog("🟡 Skipping: zkevm doesn't have an active deployment"); + return; + } address bridge = tryGetDeploymentAddress("SynapseBridge"); if (bridge == address(0)) { printLog(StringUtils.concat("🟡 Skipping: SynapseBridge is not deployed on ", activeChain)); return; } vm.startBroadcast(); - address predicted = predictAddress(type(SynapseBridge).creationCode, salt); printLog(StringUtils.concat("Predicted address: ", vm.toString(predicted))); + setDeploymentSalt(salt); address deployed = deployAndSaveAs({ contractName: "SynapseBridge", contractAlias: "SynapseBridge.Implementation", constructorArgs: "", deployCode: deployCreate2 }); + assertContractCodeExists("SynapseBridge.Implementation", deployed); if (predicted != deployed) { printLog(TAB.concat("❌ Predicted address mismatch")); assert(false); diff --git a/script/networks.json b/script/networks.json index b4c207f48..becbae725 100644 --- a/script/networks.json +++ b/script/networks.json @@ -2,7 +2,7 @@ "forgeOptions": { "aurora": "--legacy --slow", "boba": "--legacy --skip-simulation --slow", - "canto": "--legacy --slow", + "canto": "--legacy --skip-simulation --slow", "cronos": "--slow", "dfk": "--slow", "dogechain": "--legacy --slow", diff --git a/script/utils/DeployScript.sol b/script/utils/DeployScript.sol index b8ef4f2a5..bc8bf6823 100644 --- a/script/utils/DeployScript.sol +++ b/script/utils/DeployScript.sol @@ -98,14 +98,13 @@ abstract contract DeployScript is SynapseScript { sortJSON(freshFN); // Then, initiate the jq command to add "abi" as the next key // This makes sure that "address" value is printed first later + // Example: jq .abi=$data[0].abi --slurpfile data path/to/input.json path/to/output.json string[] memory inputs = new string[](6); inputs[0] = "jq"; - // Read the full artifact file into $artifact variable - inputs[1] = "--argfile"; - inputs[2] = "artifact"; - inputs[3] = _artifactPath(contractName); - // Set value for ".abi" key to artifact's ABI - inputs[4] = ".abi = $artifact.abi"; + inputs[1] = ".abi = $artifact.abi"; + inputs[2] = "--slurpfile"; + inputs[3] = "data"; + inputs[4] = _artifactPath(contractName); inputs[5] = freshFN; bytes memory full = vm.ffi(inputs); // Finally, print the updated deployment JSON diff --git a/test/bridge/legacy/SynapseBridge.Upgrade.t.sol b/test/bridge/legacy/SynapseBridge.Upgrade.t.sol index c9211be54..7c25fbebc 100644 --- a/test/bridge/legacy/SynapseBridge.Upgrade.t.sol +++ b/test/bridge/legacy/SynapseBridge.Upgrade.t.sol @@ -4,6 +4,7 @@ pragma experimental ABIEncoderV2; import {SynapseBridge} from "../../../contracts/bridge/SynapseBridge.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/TransparentUpgradeableProxy.sol"; import {Test} from "forge-std/Test.sol"; @@ -14,7 +15,10 @@ contract SynapseBridgeUpgradeArbitrumTest is Test { uint256 internal blockNumber = 344210000; address payable internal bridge = 0x6F4e8eBa4D337f874Ab57478AcC2Cb5BACdc19c9; address internal proxyAdmin = 0x432036208d2717394d2614d6697c46DF3Ed69540; + address internal implementation = 0x97a7af2A0323e2a40B866Df3A5F1F389427C9b68; + uint256 internal expectedStartBlockNumber = 13219011; + address internal expectedWethAddress = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; uint256 internal expectedBridgeVersion = 6; uint256 internal expectedChainGasAmount = 0.00001 ether; string internal rpcUrl = "https://arbitrum-one.public.blastapi.io"; @@ -37,17 +41,26 @@ contract SynapseBridgeUpgradeArbitrumTest is Test { roleAdmin = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).DEFAULT_ADMIN_ROLE(), 0); governance = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).GOVERNANCE_ROLE(), 0); nodeGroup = SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).NODEGROUP_ROLE(), 0); + + vm.label(bridge, "SynapseBridge"); + vm.label(proxyAdmin, "ProxyAdmin"); + vm.label(implementation, "OldImplementation"); + vm.label(newBridgeImplementation, "NewImplementation"); } function upgrade() public { - vm.prank(proxyAdmin); - TransparentUpgradeableProxy(bridge).upgradeTo(newBridgeImplementation); + address owner = ProxyAdmin(proxyAdmin).owner(); + vm.prank(owner); + ProxyAdmin(proxyAdmin).upgrade(TransparentUpgradeableProxy(bridge), newBridgeImplementation); } function test_getters() public { assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).DEFAULT_ADMIN_ROLE(), 0), roleAdmin); assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).GOVERNANCE_ROLE(), 0), governance); assertEq(SynapseBridge(bridge).getRoleMember(SynapseBridge(bridge).NODEGROUP_ROLE(), 0), nodeGroup); + assertNotEq(roleAdmin, address(0)); + assertNotEq(governance, address(0)); + assertNotEq(nodeGroup, address(0)); assertEq(SynapseBridge(bridge).bridgeVersion(), expectedBridgeVersion); assertEq(SynapseBridge(bridge).chainGasAmount(), expectedChainGasAmount); @@ -57,13 +70,23 @@ contract SynapseBridgeUpgradeArbitrumTest is Test { assertTrue(SynapseBridge(bridge).kappaExists(kappa)); assertFalse(SynapseBridge(bridge).kappaExists(kappa ^ bytes32(uint256(1)))); + + assertEq(SynapseBridge(bridge).startBlockNumber(), expectedStartBlockNumber); + assertEq(SynapseBridge(bridge).WETH_ADDRESS(), expectedWethAddress); + assertFalse(SynapseBridge(bridge).paused()); } function test_upgrade() public { + assertEq(getImplementation(), implementation); upgrade(); + assertEq(getImplementation(), newBridgeImplementation); expectedBridgeVersion = 8; expectedChainGasAmount = 0; test_getters(); assertFalse(SynapseBridge(bridge).isLegacySendDisabled()); } + + function getImplementation() internal view returns (address) { + return ProxyAdmin(proxyAdmin).getProxyImplementation(TransparentUpgradeableProxy(bridge)); + } } From 3c741301bf880201bb94c736e2ca93fbb453275a Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 10 Sep 2026 20:10:03 +0100 Subject: [PATCH 24/33] feat: new deploys --- deployments/aurora/DefaultPoolCalc.json | 30 + deployments/aurora/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/cronos/DefaultPoolCalc.json | 30 + deployments/cronos/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/dfk/DefaultPoolCalc.json | 30 + deployments/dfk/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/fantom/DefaultPoolCalc.json | 30 + deployments/fantom/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/harmony/DefaultPoolCalc.json | 30 + deployments/harmony/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/klatyn/DefaultPoolCalc.json | 30 + deployments/klatyn/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/metis/DefaultPoolCalc.json | 30 + deployments/metis/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/moonbeam/DefaultPoolCalc.json | 30 + deployments/moonbeam/SwapQuoterV2.json | 703 +++++++++++++++++++ deployments/moonriver/DefaultPoolCalc.json | 30 + deployments/moonriver/SwapQuoterV2.json | 703 +++++++++++++++++++ script/configs/aurora/SwapQuoterV2.dc.json | 10 + script/configs/cronos/SwapQuoterV2.dc.json | 10 + script/configs/fantom/SwapQuoterV2.dc.json | 3 + script/configs/harmony/SwapQuoterV2.dc.json | 16 + script/configs/metis/SwapQuoterV2.dc.json | 16 + script/configs/moonbeam/SwapQuoterV2.dc.json | 3 + 24 files changed, 6655 insertions(+) create mode 100644 deployments/aurora/DefaultPoolCalc.json create mode 100644 deployments/aurora/SwapQuoterV2.json create mode 100644 deployments/cronos/DefaultPoolCalc.json create mode 100644 deployments/cronos/SwapQuoterV2.json create mode 100644 deployments/dfk/DefaultPoolCalc.json create mode 100644 deployments/dfk/SwapQuoterV2.json create mode 100644 deployments/fantom/DefaultPoolCalc.json create mode 100644 deployments/fantom/SwapQuoterV2.json create mode 100644 deployments/harmony/DefaultPoolCalc.json create mode 100644 deployments/harmony/SwapQuoterV2.json create mode 100644 deployments/klatyn/DefaultPoolCalc.json create mode 100644 deployments/klatyn/SwapQuoterV2.json create mode 100644 deployments/metis/DefaultPoolCalc.json create mode 100644 deployments/metis/SwapQuoterV2.json create mode 100644 deployments/moonbeam/DefaultPoolCalc.json create mode 100644 deployments/moonbeam/SwapQuoterV2.json create mode 100644 deployments/moonriver/DefaultPoolCalc.json create mode 100644 deployments/moonriver/SwapQuoterV2.json create mode 100644 script/configs/aurora/SwapQuoterV2.dc.json create mode 100644 script/configs/cronos/SwapQuoterV2.dc.json create mode 100644 script/configs/fantom/SwapQuoterV2.dc.json create mode 100644 script/configs/harmony/SwapQuoterV2.dc.json create mode 100644 script/configs/metis/SwapQuoterV2.dc.json create mode 100644 script/configs/moonbeam/SwapQuoterV2.dc.json diff --git a/deployments/aurora/DefaultPoolCalc.json b/deployments/aurora/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/aurora/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/aurora/SwapQuoterV2.json b/deployments/aurora/SwapQuoterV2.json new file mode 100644 index 000000000..0cf496a86 --- /dev/null +++ b/deployments/aurora/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x2471E52778D9da56B52c1C1162673AF05eBB26a6", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd32000000000000000000000000c9bdeed33cd01541e1eed10f90519d2c06fe3feb0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/cronos/DefaultPoolCalc.json b/deployments/cronos/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/cronos/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/cronos/SwapQuoterV2.json b/deployments/cronos/SwapQuoterV2.json new file mode 100644 index 000000000..3d31d0c55 --- /dev/null +++ b/deployments/cronos/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0xD5E52F5594D97b052E39e290fe654d6dCf0CBc1a", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd320000000000000000000000005c7f8a570d578ed84e63fdfa7b1ee72deae1ae230000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/dfk/DefaultPoolCalc.json b/deployments/dfk/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/dfk/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/dfk/SwapQuoterV2.json b/deployments/dfk/SwapQuoterV2.json new file mode 100644 index 000000000..0cdc76bc2 --- /dev/null +++ b/deployments/dfk/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0xe367B3B59A24C4c301e27F9Ca3282E7dB0f64D07", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd32000000000000000000000000ccb93dabd71c8dad03fc4ce5559dc3d89f67a2600000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/fantom/DefaultPoolCalc.json b/deployments/fantom/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/fantom/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/fantom/SwapQuoterV2.json b/deployments/fantom/SwapQuoterV2.json new file mode 100644 index 000000000..aaa9f531f --- /dev/null +++ b/deployments/fantom/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x80b0d4BcbE1A65e1E0e339610B030C65a4760385", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd3200000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c830000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/harmony/DefaultPoolCalc.json b/deployments/harmony/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/harmony/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/harmony/SwapQuoterV2.json b/deployments/harmony/SwapQuoterV2.json new file mode 100644 index 000000000..908a2c6c8 --- /dev/null +++ b/deployments/harmony/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x1ab1142cb469Fb57F3b0957d438ebCD4b006083A", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd32000000000000000000000000005cac9eed29ccec0f9cca3a0a2052deff5846670000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/klatyn/DefaultPoolCalc.json b/deployments/klatyn/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/klatyn/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/klatyn/SwapQuoterV2.json b/deployments/klatyn/SwapQuoterV2.json new file mode 100644 index 000000000..f2e217bc6 --- /dev/null +++ b/deployments/klatyn/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x2E087ecbeA4b33F5b973C0721b578518911d741D", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd320000000000000000000000005819b6af194a78511c79c85ea68d2377a7e9335f0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/metis/DefaultPoolCalc.json b/deployments/metis/DefaultPoolCalc.json new file mode 100644 index 000000000..0075f4b56 --- /dev/null +++ b/deployments/metis/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000cc5af216a3e1614091a20e11bbfd32", + "constructorArgs": "0x", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "calculateAddLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/deployments/metis/SwapQuoterV2.json b/deployments/metis/SwapQuoterV2.json new file mode 100644 index 000000000..6cacc5a74 --- /dev/null +++ b/deployments/metis/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x71035BE2414fF19d90302f528b97183B87c3c096", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000f54b784e70e1cf1f99fb53b08d6fea00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "synapseRouter_", + "type": "address" + }, + { + "internalType": "address", + "name": "defaultPoolCalc_", + "type": "address" + }, + { + "internalType": "address", + "name": "weth_", + "type": "address" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "SwapQuoterV2__DuplicatedPool", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "SwapQuoterV2__UnknownPool", + "type": "error" + }, + { + "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": false, + "internalType": "address", + "name": "bridgeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType", + "name": "poolType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "PoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "bridgeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType", + "name": "poolType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "PoolRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "synapseRouter", + "type": "address" + } + ], + "name": "SynapseRouterUpdated", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "bridgeToken", + "type": "address" + }, + { + "internalType": "enum SwapQuoterV2.PoolType", + "name": "poolType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "internalType": "struct SwapQuoterV2.BridgePool[]", + "name": "pools", + "type": "tuple[]" + } + ], + "name": "addPools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "allPools", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "lpToken", + "type": "address" + }, + { + "components": [ + { + "internalType": "bool", + "name": "isWeth", + "type": "bool" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct PoolToken[]", + "name": "tokens", + "type": "tuple[]" + } + ], + "internalType": "struct Pool[]", + "name": "pools", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "actionMask", + "type": "uint256" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct LimitedToken", + "name": "tokenIn", + "type": "tuple" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + } + ], + "name": "areConnectedTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "calculateAddLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "calculateRemoveLiquidity", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amountsOut", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "tokenIndexFrom", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "tokenIndexTo", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "dx", + "type": "uint256" + } + ], + "name": "calculateSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenAmount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "tokenIndex", + "type": "uint8" + } + ], + "name": "calculateWithdrawOneToken", + "outputs": [ + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultPoolCalc", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "actionMask", + "type": "uint256" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct LimitedToken[]", + "name": "bridgeTokensIn", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + } + ], + "name": "findConnectedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "amountFound", + "type": "uint256" + }, + { + "internalType": "bool[]", + "name": "isConnected", + "type": "bool[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "actionMask", + "type": "uint256" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct LimitedToken", + "name": "tokenIn", + "type": "tuple" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + } + ], + "name": "getAmountOut", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "routerAdapter", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "rawParams", + "type": "bytes" + } + ], + "internalType": "struct SwapQuery", + "name": "query", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBridgePools", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "bridgeToken", + "type": "address" + }, + { + "internalType": "enum SwapQuoterV2.PoolType", + "name": "poolType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "internalType": "struct SwapQuoterV2.BridgePool[]", + "name": "bridgePools", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOriginDefaultPools", + "outputs": [ + { + "internalType": "address[]", + "name": "originDefaultPools", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOriginLinkedPools", + "outputs": [ + { + "internalType": "address[]", + "name": "originLinkedPools", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "lpToken", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "poolTokens", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "isWeth", + "type": "bool" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct PoolToken[]", + "name": "tokens", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolsAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "amtPools", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "bridgeToken", + "type": "address" + }, + { + "internalType": "enum SwapQuoterV2.PoolType", + "name": "poolType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "internalType": "struct SwapQuoterV2.BridgePool[]", + "name": "pools", + "type": "tuple[]" + } + ], + "name": "removePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "synapseRouter_", + "type": "address" + } + ], + "name": "setSynapseRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "synapseRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/deployments/moonbeam/DefaultPoolCalc.json b/deployments/moonbeam/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/moonbeam/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/moonbeam/SwapQuoterV2.json b/deployments/moonbeam/SwapQuoterV2.json new file mode 100644 index 000000000..9dd6bfaa6 --- /dev/null +++ b/deployments/moonbeam/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0xad613649354769D81F7352774740983eD9e849e2", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd32000000000000000000000000acc15dc74880c9944775448304b263d191c6077f0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/moonriver/DefaultPoolCalc.json b/deployments/moonriver/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/moonriver/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/moonriver/SwapQuoterV2.json b/deployments/moonriver/SwapQuoterV2.json new file mode 100644 index 000000000..8fe217c21 --- /dev/null +++ b/deployments/moonriver/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0xf7005D119824bD0cFc886365523e0FFE4a86E485", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd3200000000000000000000000098878b06940ae243284ca214f92bb71a2b032b8a0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/script/configs/aurora/SwapQuoterV2.dc.json b/script/configs/aurora/SwapQuoterV2.dc.json new file mode 100644 index 000000000..8cecbf81d --- /dev/null +++ b/script/configs/aurora/SwapQuoterV2.dc.json @@ -0,0 +1,10 @@ +{ + "pools": { + "0": { + "description": "nUSD", + "isLinked": false, + "pool": "0xCCd87854f58773fe75CdDa542457aC48E46c2D65", + "token": "0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c" + } + } +} \ No newline at end of file diff --git a/script/configs/cronos/SwapQuoterV2.dc.json b/script/configs/cronos/SwapQuoterV2.dc.json new file mode 100644 index 000000000..70548589f --- /dev/null +++ b/script/configs/cronos/SwapQuoterV2.dc.json @@ -0,0 +1,10 @@ +{ + "pools": { + "0": { + "description": "nUSD", + "isLinked": false, + "pool": "0xCb6674548586F20ca39C97A52A0ded86f48814De", + "token": "0x396c9c192dd323995346632581BEF92a31AC623b" + } + } +} \ No newline at end of file diff --git a/script/configs/fantom/SwapQuoterV2.dc.json b/script/configs/fantom/SwapQuoterV2.dc.json new file mode 100644 index 000000000..df52d7058 --- /dev/null +++ b/script/configs/fantom/SwapQuoterV2.dc.json @@ -0,0 +1,3 @@ +{ + "pools": [] +} \ No newline at end of file diff --git a/script/configs/harmony/SwapQuoterV2.dc.json b/script/configs/harmony/SwapQuoterV2.dc.json new file mode 100644 index 000000000..1c044b53a --- /dev/null +++ b/script/configs/harmony/SwapQuoterV2.dc.json @@ -0,0 +1,16 @@ +{ + "pools": { + "0": { + "description": "AVAX", + "isLinked": false, + "pool": "0x00A4F57D926781f62D09bb05ec76e6D8aE4268da", + "token": "0xD9eAA386cCD65F30b77FF175F6b52115FE454fD6" + }, + "1": { + "description": "JEWEL", + "isLinked": false, + "pool": "0x7bE461cce1501f07969BCE24Ccb2140fCA0a35b3", + "token": "0x28b42698Caf46B4B012CF38b6C75867E0762186D" + } + } +} \ No newline at end of file diff --git a/script/configs/metis/SwapQuoterV2.dc.json b/script/configs/metis/SwapQuoterV2.dc.json new file mode 100644 index 000000000..26de65a42 --- /dev/null +++ b/script/configs/metis/SwapQuoterV2.dc.json @@ -0,0 +1,16 @@ +{ + "pools": { + "0": { + "description": "nUSD", + "isLinked": false, + "pool": "0x555982d2E211745b96736665e19D9308B615F78e", + "token": "0x961318Fc85475E125B99Cc9215f62679aE5200aB" + }, + "1": { + "description": "nETH", + "isLinked": false, + "pool": "0x09fEC30669d63A13c666d2129230dD5588E2e240", + "token": "0x931B8f17764362A3325D30681009f0eDd6211231" + } + } +} \ No newline at end of file diff --git a/script/configs/moonbeam/SwapQuoterV2.dc.json b/script/configs/moonbeam/SwapQuoterV2.dc.json new file mode 100644 index 000000000..df52d7058 --- /dev/null +++ b/script/configs/moonbeam/SwapQuoterV2.dc.json @@ -0,0 +1,3 @@ +{ + "pools": [] +} \ No newline at end of file From 7ba447e87411021af43272a1b16f86a5931e62c4 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 10 Sep 2026 20:10:52 +0100 Subject: [PATCH 25/33] fix: foundry config --- script/networks.json | 11 ++++---- script/router/RemoveRouterTokens.s.sol | 37 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 script/router/RemoveRouterTokens.s.sol diff --git a/script/networks.json b/script/networks.json index becbae725..e3d981dd9 100644 --- a/script/networks.json +++ b/script/networks.json @@ -1,16 +1,17 @@ { "forgeOptions": { - "aurora": "--legacy --slow", + "aurora": "--legacy --slow --verifier blockscout --verifier-url https://explorer.mainnet.aurora.dev/api?", "boba": "--legacy --skip-simulation --slow", "canto": "--legacy --skip-simulation --slow", "cronos": "--slow", "dfk": "--slow", "dogechain": "--legacy --slow", - "harmony": "--legacy --slow", - "klatyn": "--skip-simulation", + "fantom": "--verifier blockscout --verifier-url https://ftmscout.com/api?", + "harmony": "--legacy --slow --verifier blockscout --verifier-url https://explorer.harmony.one/api?", + "klatyn": "--skip-simulation --verifier-url https://compiler-api-v2.kaiascan.io/mainnet/forge-verify", "metis": "--legacy", - "moonbeam": "--skip-simulation --slow", - "moonriver": "--skip-simulation --slow", + "moonbeam": "--slow", + "moonriver": "--slow", "polygon": "--slow" } } diff --git a/script/router/RemoveRouterTokens.s.sol b/script/router/RemoveRouterTokens.s.sol new file mode 100644 index 000000000..7c110a200 --- /dev/null +++ b/script/router/RemoveRouterTokens.s.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {BasicRouterScript} from "./BasicRouter.s.sol"; +import {StringUtils} from "../templates/StringUtils.sol"; + +interface ISynapseRouterManagement { + function bridgeTokens() external view returns (address[] memory tokens); + + function removeTokens(address[] calldata tokens) external; +} + +// solhint-disable no-console +contract RemoveRouterTokens is BasicRouterScript { + using StringUtils for uint256; + + function run() external { + // Setup the BasicSynapseScript + setUp(); + address router = getDeploymentAddress(ROUTER_V1); + address[] memory tokens = ISynapseRouterManagement(router).bridgeTokens(); + printLog("SynapseRouter: %s", router); + printLog(StringUtils.concat("Found ", tokens.length.fromUint(), " bridge tokens")); + if (tokens.length == 0) { + return; + } + if (!checkOwner(router)) return; + increaseIndent(); + for (uint256 i = 0; i < tokens.length; ++i) { + printLog("Removing token: %s", tokens[i]); + } + vm.startBroadcast(); + ISynapseRouterManagement(router).removeTokens(tokens); + vm.stopBroadcast(); + decreaseIndent(); + } +} From 480f7fa7a11dae357401519a2841e47e86cfc484 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 10 Sep 2026 21:28:34 +0100 Subject: [PATCH 26/33] feat: SYN token deployment and configuration scripts --- script/bridge/ConfigureSynapseToken.s.sol | 31 ++++++++++++ script/bridge/DeploySynapseToken.s.sol | 47 +++++++++++++++++++ script/bridge/TransferSynapseTokenAdmin.s.sol | 33 +++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 script/bridge/ConfigureSynapseToken.s.sol create mode 100644 script/bridge/DeploySynapseToken.s.sol create mode 100644 script/bridge/TransferSynapseTokenAdmin.s.sol diff --git a/script/bridge/ConfigureSynapseToken.s.sol b/script/bridge/ConfigureSynapseToken.s.sol new file mode 100644 index 000000000..a42ef6b2f --- /dev/null +++ b/script/bridge/ConfigureSynapseToken.s.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseERC20} from "../../contracts/bridge/SynapseERC20.sol"; +import {BasicSynapseScript} from "../templates/BasicSynapse.s.sol"; + +contract ConfigureSynapseToken is BasicSynapseScript { + /// @notice Grants minting permissions to the active chain's SynapseAdapter deployment. + function run() external { + setUp(); + SynapseERC20 token = SynapseERC20(getDeploymentAddress("SynapseToken")); + if (!token.hasRole(token.DEFAULT_ADMIN_ROLE(), msg.sender)) { + printLog("Skipping: sender is not an admin"); + return; + } + address synapseAdapter = getDeploymentAddress("SynapseAdapter"); + bytes32 minterRole = token.MINTER_ROLE(); + + vm.startBroadcast(msg.sender); + if (!token.hasRole(minterRole, synapseAdapter)) { + token.grantRole(minterRole, synapseAdapter); + printLog("Granted MINTER_ROLE to SynapseAdapter: %s", synapseAdapter); + } else { + printLog("Skipping: SynapseAdapter is already a minter: %s", synapseAdapter); + } + vm.stopBroadcast(); + + require(token.hasRole(minterRole, synapseAdapter), "SynapseAdapter is not a minter"); + } +} diff --git a/script/bridge/DeploySynapseToken.s.sol b/script/bridge/DeploySynapseToken.s.sol new file mode 100644 index 000000000..08c4cec56 --- /dev/null +++ b/script/bridge/DeploySynapseToken.s.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; + +import {SynapseERC20} from "../../contracts/bridge/SynapseERC20.sol"; +import {BasicSynapseScript, StringUtils} from "../templates/BasicSynapse.s.sol"; + +contract DeploySynapseToken is BasicSynapseScript { + using StringUtils for string; + + address public synapseERC20Impl; + SynapseERC20 public token; + + function run() external { + setUp(); + vm.startBroadcast(msg.sender); + synapseERC20Impl = deployAndSave({contractName: "SynapseERC20", deployContract: deploySynapseERC20}); + assertContractCodeExists("SynapseERC20", synapseERC20Impl); + token = SynapseERC20( + deployAndSaveAs({contractName: "SynapseERC20", contractAlias: "SynapseToken", deployContract: deployToken}) + ); + vm.stopBroadcast(); + + checkToken(); + } + + function deploySynapseERC20() internal returns (address deployedAt, bytes memory constructorArgs) { + deployedAt = address(new SynapseERC20()); + constructorArgs = ""; + } + + function deployToken() internal returns (address deployedAt, bytes memory constructorArgs) { + deployedAt = Clones.clone(synapseERC20Impl); + // Broadcasting creates separate deployment and initialization transactions. + // If initialization is front-run, discard this deployment and deploy a new clone. + SynapseERC20(deployedAt).initialize("Synapse", "SYN", 18, msg.sender); + constructorArgs = ""; + } + + function checkToken() internal view { + require(token.name().equals("Synapse"), "Incorrect token name"); + require(token.symbol().equals("SYN"), "Incorrect token symbol"); + require(token.decimals() == 18, "Incorrect token decimals"); + } +} diff --git a/script/bridge/TransferSynapseTokenAdmin.s.sol b/script/bridge/TransferSynapseTokenAdmin.s.sol new file mode 100644 index 000000000..20f66ba92 --- /dev/null +++ b/script/bridge/TransferSynapseTokenAdmin.s.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +import {SynapseERC20} from "../../contracts/bridge/SynapseERC20.sol"; +import {BasicSynapseScript} from "../templates/BasicSynapse.s.sol"; + +contract TransferSynapseTokenAdmin is BasicSynapseScript { + function run() external { + setUp(); + SynapseERC20 token = SynapseERC20(getDeploymentAddress("SynapseToken")); + bytes32 adminRole = token.DEFAULT_ADMIN_ROLE(); + if (!token.hasRole(adminRole, msg.sender)) { + printLog("Skipping: sender is not an admin"); + return; + } + address multisig = getDeploymentAddress("DevMultisig"); + + vm.startBroadcast(msg.sender); + if (!token.hasRole(adminRole, multisig)) { + token.grantRole(adminRole, multisig); + printLog("Granted DEFAULT_ADMIN_ROLE to DevMultisig: %s", multisig); + } + if (msg.sender != multisig) { + token.renounceRole(adminRole, msg.sender); + printLog("Renounced DEFAULT_ADMIN_ROLE for sender: %s", msg.sender); + } + vm.stopBroadcast(); + + require(token.hasRole(adminRole, multisig), "DevMultisig is not the admin"); + require(token.getRoleMemberCount(adminRole) == 1, "Admin count is not 1"); + } +} From 332dc7a396169c297b06dd46c71fe117016f38c5 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 11 Sep 2026 11:36:13 +0100 Subject: [PATCH 27/33] feat: HyperEVM config and testnet SYN deployments --- .env.example | 4 + deployments/eth_sepolia/SynapseERC20.json | 669 ++++++++++++++++++ deployments/eth_sepolia/SynapseToken.json | 669 ++++++++++++++++++ deployments/hyperevm/.chainId | 1 + deployments/hyperevm_testnet/.chainId | 1 + .../hyperevm_testnet/SynapseERC20.json | 669 ++++++++++++++++++ .../hyperevm_testnet/SynapseToken.json | 669 ++++++++++++++++++ foundry.toml | 4 +- 8 files changed, 2685 insertions(+), 1 deletion(-) create mode 100644 deployments/eth_sepolia/SynapseERC20.json create mode 100644 deployments/eth_sepolia/SynapseToken.json create mode 100644 deployments/hyperevm/.chainId create mode 100644 deployments/hyperevm_testnet/.chainId create mode 100644 deployments/hyperevm_testnet/SynapseERC20.json create mode 100644 deployments/hyperevm_testnet/SynapseToken.json diff --git a/.env.example b/.env.example index 91b2a231b..a1beaa3c2 100644 --- a/.env.example +++ b/.env.example @@ -64,6 +64,8 @@ FANTOM_ETHERSCAN_URL=https://api.ftmscan.com/api FANTOM_ETHERSCAN_KEY=PasteYourOwnKeyPlease # Harmony HARMONY_API=https://api.s0.t.hmny.io +# HyperEVM +HYPEREVM_API=https://rpc.hyperliquid.xyz/evm # Klaytn KLATYN_API=https://public-node-api.klaytnapi.com/v1/cypress # Linea @@ -119,6 +121,8 @@ BNB_TESTNET_ETHERSCAN_KEY=YourBscScanKey ETH_SEPOLIA_API=https://rpc.sepolia.org ETH_SEPOLIA_ETHERSCAN_URL=https://api-sepolia.etherscan.io/api ETH_SEPOLIA_ETHERSCAN_KEY=YourEtherScanKey +# HyperEVM Testnet +HYPEREVM_TESTNET_API=https://rpc.hyperliquid-testnet.xyz/evm # Optimism Sepolia OP_SEPOLIA_API=https://optimism-sepolia.blockpi.network/v1/rpc/public OP_SEPOLIA_ETHERSCAN_URL=https://api-sepolia-optimistic.etherscan.io/api diff --git a/deployments/eth_sepolia/SynapseERC20.json b/deployments/eth_sepolia/SynapseERC20.json new file mode 100644 index 000000000..5a35af47d --- /dev/null +++ b/deployments/eth_sepolia/SynapseERC20.json @@ -0,0 +1,669 @@ +{ + "address": "0x31B8F9b47afc4Fceb445B4959052774E71e2B06F", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/eth_sepolia/SynapseToken.json b/deployments/eth_sepolia/SynapseToken.json new file mode 100644 index 000000000..3502dc8e3 --- /dev/null +++ b/deployments/eth_sepolia/SynapseToken.json @@ -0,0 +1,669 @@ +{ + "address": "0x259A84D683033D54c81d69bB4D5a7880f4f03C2E", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/hyperevm/.chainId b/deployments/hyperevm/.chainId new file mode 100644 index 000000000..a6905f8ba --- /dev/null +++ b/deployments/hyperevm/.chainId @@ -0,0 +1 @@ +999 diff --git a/deployments/hyperevm_testnet/.chainId b/deployments/hyperevm_testnet/.chainId new file mode 100644 index 000000000..806adbfbe --- /dev/null +++ b/deployments/hyperevm_testnet/.chainId @@ -0,0 +1 @@ +998 diff --git a/deployments/hyperevm_testnet/SynapseERC20.json b/deployments/hyperevm_testnet/SynapseERC20.json new file mode 100644 index 000000000..59034f44d --- /dev/null +++ b/deployments/hyperevm_testnet/SynapseERC20.json @@ -0,0 +1,669 @@ +{ + "address": "0xA98B5C63a3E19Dd0321d794633b770A8D3dA3C5D", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/hyperevm_testnet/SynapseToken.json b/deployments/hyperevm_testnet/SynapseToken.json new file mode 100644 index 000000000..f93d93d3f --- /dev/null +++ b/deployments/hyperevm_testnet/SynapseToken.json @@ -0,0 +1,669 @@ +{ + "address": "0x8921aDABBE9D4743DD8dA936aa09a35bBA3C7838", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 4427eced4..76b0ac5dd 100644 --- a/foundry.toml +++ b/foundry.toml @@ -34,6 +34,7 @@ dfk = "${DFK_API}" dogechain = "${DOGECHAIN_API}" fantom = "${FANTOM_API}" harmony = "${HARMONY_API}" +hyperevm = "${HYPEREVM_API}" klatyn = "${KLATYN_API}" linea = "${LINEA_API}" mainnet = "${MAINNET_API}" @@ -48,8 +49,9 @@ zkevm = "${ZKEVM_API}" arb_sepolia = "${ARB_SEPOLIA_API}" base_sepolia = "${BASE_SEPOLIA_API}" eth_sepolia = "${ETH_SEPOLIA_API}" +hyperevm_testnet = "${HYPEREVM_TESTNET_API}" op_sepolia = "${OP_SEPOLIA_API}" scroll_sepolia = "${SCROLL_SEPOLIA_API}" [etherscan] -# No entries required with Etherscan V2 \ No newline at end of file +# No entries required with Etherscan V2 From 2af4d09cd4964835afacff72a4919a3b19c31f9c Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 11 Sep 2026 14:43:42 +0100 Subject: [PATCH 28/33] feat: testnet SynapseAdapter and CREATE2 factory deployments --- deployments/eth_sepolia/SynapseAdapter.json | 3 +++ deployments/hyperevm_testnet/Create2Factory.json | 4 ++++ deployments/hyperevm_testnet/SynapseAdapter.json | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 deployments/eth_sepolia/SynapseAdapter.json create mode 100644 deployments/hyperevm_testnet/Create2Factory.json create mode 100644 deployments/hyperevm_testnet/SynapseAdapter.json diff --git a/deployments/eth_sepolia/SynapseAdapter.json b/deployments/eth_sepolia/SynapseAdapter.json new file mode 100644 index 000000000..782c95b34 --- /dev/null +++ b/deployments/eth_sepolia/SynapseAdapter.json @@ -0,0 +1,3 @@ +{ + "address": "0x2a0833171D787dAbBeEe7Fd721725d03DF7334c9" +} diff --git a/deployments/hyperevm_testnet/Create2Factory.json b/deployments/hyperevm_testnet/Create2Factory.json new file mode 100644 index 000000000..66ac39a50 --- /dev/null +++ b/deployments/hyperevm_testnet/Create2Factory.json @@ -0,0 +1,4 @@ +{ + "address": "0xa6190aBC82427800935E0598892f7488a7F73A04", + "constructorArgs": "0x" +} \ No newline at end of file diff --git a/deployments/hyperevm_testnet/SynapseAdapter.json b/deployments/hyperevm_testnet/SynapseAdapter.json new file mode 100644 index 000000000..782c95b34 --- /dev/null +++ b/deployments/hyperevm_testnet/SynapseAdapter.json @@ -0,0 +1,3 @@ +{ + "address": "0x2a0833171D787dAbBeEe7Fd721725d03DF7334c9" +} From 233b0638fecf85ab281c80812ea1d148f492bfcf Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Sun, 13 Sep 2026 10:44:19 +0100 Subject: [PATCH 29/33] feat: HyperEVM mainnet SYN deployment --- deployments/hyperevm/SynapseERC20.json | 669 +++++++++++++++++++++++++ deployments/hyperevm/SynapseToken.json | 669 +++++++++++++++++++++++++ 2 files changed, 1338 insertions(+) create mode 100644 deployments/hyperevm/SynapseERC20.json create mode 100644 deployments/hyperevm/SynapseToken.json diff --git a/deployments/hyperevm/SynapseERC20.json b/deployments/hyperevm/SynapseERC20.json new file mode 100644 index 000000000..09c05e667 --- /dev/null +++ b/deployments/hyperevm/SynapseERC20.json @@ -0,0 +1,669 @@ +{ + "address": "0x648c51d6688EDf9e46Ce4421188de2a335367fee", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/hyperevm/SynapseToken.json b/deployments/hyperevm/SynapseToken.json new file mode 100644 index 000000000..b0d486d04 --- /dev/null +++ b/deployments/hyperevm/SynapseToken.json @@ -0,0 +1,669 @@ +{ + "address": "0x6Cd6C5fDE1621053eD4BC7C09ADc76612D8C663f", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decreaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "subtractedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "addedValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file From ee7d4851c14cda1fff6d529fc5852ef5610698e4 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 15 Sep 2026 12:26:34 +0100 Subject: [PATCH 30/33] feat: HyperEVM adapter and multisig deployments --- deployments/hyperevm/DevMultisig.json | 3 +++ deployments/hyperevm/SynapseAdapter.json | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 deployments/hyperevm/DevMultisig.json create mode 100644 deployments/hyperevm/SynapseAdapter.json diff --git a/deployments/hyperevm/DevMultisig.json b/deployments/hyperevm/DevMultisig.json new file mode 100644 index 000000000..411edf46c --- /dev/null +++ b/deployments/hyperevm/DevMultisig.json @@ -0,0 +1,3 @@ +{ + "address": "0xF741246D2e0ADD4EFa7e88BE0961cccf3562b502" +} diff --git a/deployments/hyperevm/SynapseAdapter.json b/deployments/hyperevm/SynapseAdapter.json new file mode 100644 index 000000000..1b0f0c93f --- /dev/null +++ b/deployments/hyperevm/SynapseAdapter.json @@ -0,0 +1,3 @@ +{ + "address": "0x50000064684A225e32216c4FC4f17B3206000005" +} From 72774897175c3cbb222da937960bd82ae2238d20 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 15 Sep 2026 12:36:11 +0100 Subject: [PATCH 31/33] fix: stop saving deployments after failed Forge runs --- script/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/run.sh b/script/run.sh index 88ae2bbee..286d851bc 100755 --- a/script/run.sh +++ b/script/run.sh @@ -118,6 +118,11 @@ bash -x -c "forge script $SCRIPT_PATH \ $WALLET_OPTIONS \ $CHAIN_OPTIONS \ $FORGE_OPTIONS" +FORGE_EXIT_CODE=$? +if [ "$FORGE_EXIT_CODE" -ne 0 ]; then + echo -e "${RED}Forge failed; deployment artifacts were not promoted.${NC}" + exit "$FORGE_EXIT_CODE" +fi # Save new deployments if this is a broadcasted deployment script if [ "$IS_BROADCASTED_DEPLOYMENT" == "1" ]; then From acac535fbfde9b8d574d114d8e11bbeb5c5a6725 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 15 Sep 2026 14:47:40 +0100 Subject: [PATCH 32/33] fix: pin Foundry CI to v1.3.6 --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 31bb242fb..4d03e4758 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -69,7 +69,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: - version: nightly + version: v1.3.6 - name: Run tests run: ./script/foundry-base.sh @@ -100,7 +100,7 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: - version: nightly + version: v1.3.6 - name: Build contracts run: forge build From cc526186d4a9bf47e5c4cb585a0652206088302c Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Tue, 15 Sep 2026 15:21:35 +0100 Subject: [PATCH 33/33] fix: deployment ABI handling and directory iteration --- script/bridge/deploy-implementation.sh | 3 ++- script/utils/DeployScript.sol | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/script/bridge/deploy-implementation.sh b/script/bridge/deploy-implementation.sh index d1eaaa588..664f4abe8 100755 --- a/script/bridge/deploy-implementation.sh +++ b/script/bridge/deploy-implementation.sh @@ -22,7 +22,8 @@ cd "$PROJECT_ROOT" || exit 1 # Run the script on all chains with SynapseBridge deployment # Look within deployments/chainName for SynapseBridge.json -for chainName in $(ls deployments); do +for chainName in deployments/*/; do + chainName=$(basename "$chainName") if [ -f "deployments/$chainName/SynapseBridge.json" ]; then ./script/run.sh ./script/bridge/DeploySynapseBridge.s.sol "$chainName" "$WALLET_NAME" "$@" fi diff --git a/script/utils/DeployScript.sol b/script/utils/DeployScript.sol index bc8bf6823..4b1e1e7ab 100644 --- a/script/utils/DeployScript.sol +++ b/script/utils/DeployScript.sol @@ -101,7 +101,7 @@ abstract contract DeployScript is SynapseScript { // Example: jq .abi=$data[0].abi --slurpfile data path/to/input.json path/to/output.json string[] memory inputs = new string[](6); inputs[0] = "jq"; - inputs[1] = ".abi = $artifact.abi"; + inputs[1] = ".abi = $data[0].abi"; inputs[2] = "--slurpfile"; inputs[3] = "data"; inputs[4] = _artifactPath(contractName);